• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: 0 for 2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 0 for 2


  • Subject: Re: 0 for 2
  • From: Luther Fuller <email@hidden>
  • Date: Thu, 21 Jan 2010 12:28:10 -0600

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?

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: 0 for 2
      • From: Shane Stanley <email@hidden>
    • Re: 0 for 2
      • From: "Stockly, Ed" <email@hidden>
References: 
 >0 for 2 (From: Jack Schwart <email@hidden>)

  • Prev by Date: Re: 0 for 2
  • Next by Date: Re: 0 for 2
  • Previous by thread: Re: 0 for 2
  • Next by thread: Re: 0 for 2
  • Index(es):
    • Date
    • Thread