Apple Script Keystroke down ?

Discussion in 'Mac Programming' started by XPcentric, Apr 6, 2012.

  1. macrumors regular

    Joined:
    Oct 16, 2008
    #1
    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

    obviously it doesnt work
     
  2. ds0
    macrumors newbie

    Joined:
    Aug 28, 2008
    #2
    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
     
  3. thread starter macrumors regular

    Joined:
    Oct 16, 2008
    #3
    thank you, it works!
     

Share This Page