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


Click here to return to the 'do the same thing with quickeys & more scripts' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
do the same thing with quickeys & more scripts
Authored by: loren_ryter on Apr 16, '02 12:21:43PM

you can do the same thing with quickeys, and maybe other similar applications that allow you to assign applescripts to keys.

i have a whole bunch of itunes keys configured. usually with an arrow key and a modifier.

for instance

* previous track

tell application "itunes"
previous track
end tell

* next track

tell application "itunes"
next track
end tell


* volume up

tell application "itunes"
set sound volume to sound volume + 10
end tell

* volume down

tell application "itunes"
set sound volume to sound volume - 10
end tell

* toggle play/pause (only IT 2.0.4)

tell application "itunes"
playpause
end tell

* pick a playlist & play (best run from a file):

--pick a playlist;
--no options for quick keys

try
tell application "iTunes"
set the_playlists to the name of every playlist
set count_pl to count the_playlists
end tell

tell application "iTunes"
--used for now because "frontmost" activates quickeys
--tell frontmost
activate
set the_choice to choose from list the_playlists with prompt "Pick a Playlist:"
end tell

tell application "iTunes"
set the_pl to item 1 of (every playlist whose name is the_choice)
set the_total to count tracks in the_pl
set n to random number from 1 to the_total --use for random track
--set n to 1 ---use for non-random track
play track n of the_pl
end tell
on error error_message number error_number
if the error_number is not -128 then
beep
else
error number -128
end if
end try






[ Reply to This | # ]