Repeat until keystroke
IRED basicly connects each IR signal from the remote to an Apple Script. E.g to start playing music I would push space on the keyboard, the apple script that IRED calls up that does this looks like this
tell application "System Events"
try
if process "Front Row" is frontmost then
keystroke " " -- space
end if
end try
end tell
So in anutshell, each time I push a button on the remote IRED callls up an applescript to simulate pushing the respective button on the keyboard.
So far so good. For scrolling through my music collection I would like to starts crolling down until another button is pushed and another apple script is launched.
I am thinking along the line
set message to " "
repeat until message contains "Stop"
tell application "System Events"
key code 125
end tell
end repeat
Question is, what do I have to put in the other apple apple script that the variable message will equal "stop". I tried the ovious but that wasn't flying.
What also may work is, get another applescript to push some sort of keycombination that forces the looped apple script to stop but I doubt that is possible.
Any input is appreciated.
JK
Powerbook G4/Intel Imac 20", Mac OS X (10.4.6)