Re: GUI scripting?
Re: GUI scripting?
- Subject: Re: GUI scripting?
- From: Yvan KOENIG <email@hidden>
- Date: Fri, 8 Apr 2005 21:02:36 +0200
Le 8 avr. 2005 , à 16:48, Paul Berkowitz a écrit :
On 4/8/05 7:09 AM, "Geoff Canyon" <email@hidden> wrote:
Is there a way to script the arrow keys using GUI scripting? I haven't
figured out how to encode an arrow key into a script.
The old OS 7/8/9 hack of emulating ASCII characters 28 through 31 still
seems to work in some contexts in OS X:
tell application "TextEdit" to activate
tell application "System Events"
tell process "TextEdit"
keystroke (ASCII character 28)
end tell
end tell
moves the cursor to the left.
In other contexts (like text fields in my AS Studio app) where that
may not
work you can do it via the 'key code' command. I worked out that key
code
125 and 126 work the up and down arrows, for example. It's supposed to
be
machine-dependent, but I've been assured that all keyboards in recent
years
(or decades) have the same key codes for the arrows.
Hello
Glad to read that arrows are got with the same code on all keyboards.
Would be fine if it was the same for letters.
Keystroke "i" generates a "q"
and
Keystroke "I" generates a "Q"
when applied on french physical keyboards using french map.
BORING isn't it ?
The info was passed to Apple guys for months but the anomaly is always
here !
Yvan KOENIG (from FRANCE)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden