Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

XPcentric

macrumors 6502
Original poster
Oct 16, 2008
271
0
hey guys, I'm trying to make a script using Apple Script to repeat/loop keystroke down arrow while using Firefox, but as I dont use this program everyday I forgot all that I knew before and I find it easier to ask here for someone who uses daily and can make the script.

many thanks

tell application "Firefox"
activate
repeat
tell application "System Events"
keystroke downArrow
delay 2
end tel
end tell

obviously it doesnt work
 

ds0

macrumors newbie
Aug 28, 2008
9
0
keystroke doesn't respond unless you're talking to System Events, since it's using the Universal Access Assistive framework. Also, downArrow is a variable, not the actual keystroke for the down arrow. Since I can't think of the right one, just use the key code.

That said, just change your keystroke line to:

tell application "System Events" to tell process "Firefox" to key code 125
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.