On Jan 20, 2010, at 2:52 PM, Jack Schwart wrote: Can anyone point a fledging applescripter in the right direction to learn Xcode?
I, too, have been trying to use Xcode with AppleScript and I'm not having much luck. My approach is to take a small AppleScript that is known to work and transfer it to Xcode. (No Cocoa or C as yet. So the discussion is within Applescript Users.) After a couple of days doing a great many things that don't work, I arrived at ...
script Project_3AppDelegate property parent : class "NSObject" property nowMany : 1 on beeper(n) beep n end beeper on run repeat display dialog "Beep how many times ..." default answer nowMany try (text returned of the result) as integer set nowMany to the result exit repeat end try end repeat beeper(nowMany) set nowMany to (1 + nowMany) end run on applicationWillFinishLaunching_(aNotification) -- Insert code here to initialize your application before any files are opened run me tell me to quit end applicationWillFinishLaunching_ on applicationShouldTerminate_(sender) -- Insert code here to do any housekeeping before your application quits return current application's NSTerminateNow end applicationShouldTerminate_ end script
It does beep, but only once. And it always creates a window which I don't want, but I can't determine why.
It seems to me that knowing what 'applicationWillFinishLaunching_' means might help me to write the script correctly, but a search (Google, Apple) reveals nothing except discussions, which are useless to me at this point. There is no documentation to be found.
Now what do I do?
|