AppleScript bug in cocoa
AppleScript bug in cocoa
- Subject: AppleScript bug in cocoa
- From: Jean-Olivier Lanctôt <email@hidden>
- Date: Tue, 27 Dec 2005 23:35:02 -0500
Hi,
In my app, I make extensive use of AppleScript (via NSAppleScript) to
communicate with iTunes. I have 10 scripts, located inside my
resources bundle.
The problem is that each time my app starts, it starts iTunes up if
it's not already running. I consider this to be a bug, since all my
apple scripts use this to make sure iTunes does not start up when
it's not running....
on itunes_is_running()
tell application "System Events" to set pros to name of processes
if pros does not contain "iTunes" then
return false
else
return true
end if
end itunes_is_running
and then
if (itunes_is_running())
tell application "iTunes"
...
end tell
end if
sometimes, it's also impossible to quit itunes, since my app keeps on
restarting it for no reason!
I'm baffled. I don't know what to do and I depend on AppleScript.
I can't release an app that has this type of behavior.
Help!
Thanks,
--Olivier
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden