Hello List,
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 set x to name of current track & " " & artist of current track return x else return "No" end if end tell else return "No" end if end tell
All subsequent executions of the script work as expected (i.e. not launching iTunes if it is not running)
If the script is modified like this:
tell application "System Events" if exists process "iTunes" then return "Yes" else return "No" end if end tell
Everything works as expected again.
Thanks a lot for your help!
Alex
P.S.: If Apple people are reading this, I have filed this in the bugreporter as issue 4197892
|