• 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: NSAppleScript: Compiling a script launches an application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSAppleScript: Compiling a script launches an application


  • Subject: Re: NSAppleScript: Compiling a script launches an application
  • From: Simon Forster <email@hidden>
  • Date: Fri, 29 Jul 2005 14:20:32 +0100


On 29 Jul 2005, at 14:01, Alexander von Below wrote:

I am usually a Cocoa coder, and have noted something that seems odd to me: If the following file is compiled by an NSAppleScript object (either explictly or upon first execution), iTunes is launched:


tell application "System Events" if exists process "iTunes" then tell application "iTunes" if player state is playing then
...
All subsequent executions of the script work as expected (i.e. not launching iTunes if it is not running)

I believe that on compilation, iTunes is launched to get the appropriate event codes (terminology?). Once compiled, the event codes are saved so iTunes is not launched again.


Simon Forster
_____________________________________________________
 LDML Ltd, 62 Pall Mall, London, SW1Y 5HZ, UK
 Tel: +44 (0)70 9230 5244   Fax: +44 (0)70 9230 5247
_____________________________________________________

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >NSAppleScript: Compiling a script launches an application (From: Alexander von Below <email@hidden>)

  • Prev by Date: Re: [OT] "Message" when file created.
  • Next by Date: Re: NSAppleScript: Compiling a script launches an application
  • Previous by thread: NSAppleScript: Compiling a script launches an application
  • Next by thread: Re: NSAppleScript: Compiling a script launches an application
  • Index(es):
    • Date
    • Thread