Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Here is code that will not launch iTunes accidentally' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Here is code that will not launch iTunes accidentally
Authored by: Krioni on Nov 22, '02 02:23:16PM

I've used YoupiKeys with AppleScript to do this for a while. Here's a suggestion: it should only playpause if iTunes is already running, so you don't launch iTunes by accident while doing a sales presentation. Here's the code:

tell application "Finder" to if (name of processes) contains "iTunes" then
tell application "iTunes"
playpause
end tell
end if

Also, you can put that "is running?" line in front of the Next Track and Previous Track commands, too:

tell application "Finder" to if (name of processes) contains "iTunes" then
tell application "iTunes"
next track -- or previous track
end tell
end if



[ Reply to This | # ]