Re: NSAppleScript: Compiling a script launches an application
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