Applescript and Cocoa

I got the AppleEvent timed out in the open event as well as default Window Open.

What is important is the timer saved the day.

Hmm, I should file the failure in the open event as a bug. I have just confirmed that calling the original script from a button works as expected.

It is a good idea to file a bug report. Although it is very possible that the error comes from the fact the app needs to initialize the Apple Events environment. I would have expected it to work in the Window Open, though.

OK, back in the office and changed the call to the Applescript from the App.Open even to a button on a window. My 1100+ line Applescript now works again as expected, no other changes required. There’s a few hours of my life I’ll never get back but there will be a bug report being filed today.

And thanks again for all those who contributed to tracking down the problem, it’s very much appreciated.

Excuse me if I say a stupid thing, I didn’t read carefully all the posts, but I remember that I had trouble in the past when displaying a dialog (MsgBox “Hello”) before the MainWindow was displayed (WinMain.Show).