I am a little stumped by this one:
I have OS 9.2.2. I have iTunes. I have headphones. I have music. I want to be able to pause/play iTunes with 1 key. I don’t want to pay for that feature. I don’t want it to take very long to send the appropriate command to iTunes.
So, I tried this: I wrote a script that get the play status of iTunes. If iTunes is playing, then pause it. If iTunes is doing anything else, play. It works fantastic, and it is nearly instantaneous when it runs from Script Editor.
Now, I want to do this with a keystroke from anywhere in the OS. I have the Hot Function Key control panel. I use it to launch the script saved as an application. It takes too long to load the application compared to grabbing my mouse,and using the control strip module for iTunes. So I thought I could save it to stay open after launch. That way, after it loads the first time, I can keep activating it and get my nice near-istantaneous control. But, little did I realize that the “on run” just works on launch. Or perhaps I am missing something.
Here is what I have now:
on run beCool() end run on beCool() tell application "iTunes" set whatChaDoin to player state--what is iTunes doing? if whatChaDoin = playing then pause else play end if end tell--app "iTunes" end beCool
It aint cool. What can I do? I know there is “T-Minus Ten” but I don’t want to pay for that one feature, and it is not as fast as running the script from Script Editor. I’d settle for understanding how to keep a script app open and just get it to run every time it’s activated, or ideally, I’d like a compiled script to run á la OSA Menu (which I know has keyboard shortcuts–it just is wonky with CarbonLib apps like Freehand 10, Quicken Deluxe 2002, Script Editor etc.)
BTW, I’m using a beige G3 with ADB keybaord. I think there are some keys on newer USB keyboards that do that type of thing, but I haven’t had my hands on a new desktop machine in two years. (I do have a dual USB iBook, wich has a mute key that I like to use for essentially this purpose.)
Thanks Everybody! Have a great weekend!
PS, how does one get a script listing in this BBS without manually formatting it? I couldn’t find the faq quickly for the BBS.