You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

UI System Elements Keystrokes (Arrows)

Hello Applescripters,
I've just come across a good script example that will emulate the enterng of keystrokes. I'm trying to figure our how to tell the Applescript to do an Arrow up or down to navigate through a finder window. Any help is greatly appreciated. Thanks in advance.
Max

Powerbook 15", Mac OS X (10.4.7), 1GB RAM 80GB HD

Posted on Sep 24, 2006 7:44 PM

Reply
6 replies

Sep 24, 2006 8:37 PM in response to desioner

Hi desioner

try:

tell application "System Events" to key code 31 using control down --down arrow

tell application "System Events" to key code 30 using control down --up arrow

tell application "System Events" to key code 29 using control down --right arrow

tell application "System Events" to key code 28 using control down --left arrow

Budgie

Sep 25, 2006 1:10 AM in response to Budgie

Hello

As far as I know, the key code values given to enter arrows are specific to US keyboards and doesn't work for a french one for instance.

Why not use the international ones:

tell application "System Events" to keystroke (ASCII character 31) --down arrow

tell application "System Events" to keystroke (ASCII character 30) --up arrow

tell application "System Events" to keystroke (ASCII character 29) --right arrow

tell application "System Events" to keystroke (ASCII character 28) --left arrow

If I make no mistake, these are OK worlwide.

Yvan KOENIG (from FRANCE lundi 25 septembre 2006 10:09:56)

UI System Elements Keystrokes (Arrows)

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.