 |
 |
Help me write a quick Applescript
|
 |
|
 |
|
Mac Elite
Join Date: Apr 2002
Location: Miami Beach
Status:
Offline
|
|
I just picked up a Logitech MX1000 and I want to assign one of the buttons to switch to the next song in iTunes. Since the mouse setup isn't that in-depth, I figured Applescript would be a way to do it bc the software lets you set a button to open an App .
The script can be simple - just assume that iTunes is open. The script would have to select iTunes as the active app, then do the 'right arrow' key command. Shouldn't be too complex and I'd do it if I knew anything about Applescript.
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Oct 1999
Location: Always within bluetooth range
Status:
Offline
|
|
It'd be a pretty easy script to write, but to launch and run a mini-app just to change the track would probably take more time than just using the Dock controls for iTunes. Another idea would be to get something like Sizzling Keys that lets you assign global keystrokes to iTunes and then map a mouse button to that keystroke.
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Oct 1999
Location: Always within bluetooth range
Status:
Offline
|
|
Oh, BTW. Here's the script
Code:
tell application "iTunes"
activate
next track
end tell
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Apr 2002
Location: Miami Beach
Status:
Offline
|
|
I love answering my own stupid questions...
tell application "iTunes"
activate
end tell
tell application "iTunes"
next track
end tell
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Apr 2002
Location: Miami Beach
Status:
Offline
|
|
**forgot to refresh the thread before I replied. Thanks Krusty**
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Apr 2002
Location: Miami Beach
Status:
Offline
|
|
tell application "iTunes"
activate
next track
close every window
end tell
This one is better bc it gets rid of the window. (You can click on the dock icon to show it again)
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Sep 1999
Location: Ottawa, ON, Canada
Status:
Offline
|
|
I don't think you need the "activate" step. That only brings it to the forground.
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Oct 1999
Location: Always within bluetooth range
Status:
Offline
|
|
Originally Posted by hayesk
I don't think you need the "activate" step. That only brings it to the forground.
You're right ... I didn't even think of that. Just drop the "activate" rozwado and then you can drop the close every window portion too... it'll just advance the song in the background if you have no windows open. 
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |