Pengu
Digital Music Pimp
Hiyas,
I'm trying to build an AppleScript app to control iTunes. I've run into a problem with rewinding. It's simple enough on it's own, until you try to make ONE button do two things..
that will obviously rewind.
the same code with "back track" or "previous track" will either skip backwards one track, or skip to the beginning of the song (or to the prev. song if at the beginning already).
However, using on mouse down and on mouse up etc I cannot for the life of me work out how to get it to intelligently rewind if the button is held down, or skip backwards if clicked. I tried to work it out from the code in the default Konfabulator widget, but that mixes with javascript and I don't know enough about how Applescript stores variables, or the extra commands...
Any help on this would be greatly appreciated.
I'm trying to build an AppleScript app to control iTunes. I've run into a problem with rewinding. It's simple enough on it's own, until you try to make ONE button do two things..
Code:
on clicked prev_button
tell application "iTunes"
rewind
end tell
end clicked
that will obviously rewind.
the same code with "back track" or "previous track" will either skip backwards one track, or skip to the beginning of the song (or to the prev. song if at the beginning already).
However, using on mouse down and on mouse up etc I cannot for the life of me work out how to get it to intelligently rewind if the button is held down, or skip backwards if clicked. I tried to work it out from the code in the default Konfabulator widget, but that mixes with javascript and I don't know enough about how Applescript stores variables, or the extra commands...
Any help on this would be greatly appreciated.