Re: Need Type Command for OS X
Re: Need Type Command for OS X
- Subject: Re: Need Type Command for OS X
- From: Paul Berkowitz <email@hidden>
- Date: Sun, 13 Jul 2003 14:54:44 -0700
On 7/13/03 2:32 PM, "John Delacour" <email@hidden> wrote:
>
At 10:45 am -0700 13/7/03, Howard Sambol wrote:
>
>
> To all:
>
>
>
> I Need Type Command for OS X Applescript. I had an extension for AS
>
> in OS 9 but cannot find the equivalent for OS X. This command allows
>
> you to use a "type" command inside a script. Thanks!
>
>
From "System Events" 1.2.1 dictionary:
>
>
keystroke: cause the target process to behave as if keystrokes were entered
>
keystroke Unicode text -- The keystrokes to be sent.
>
[with option down/control down/shift down/command down] --
>
modifiers with which the keystrokes are to be entered
>
>
This ought to work:
>
>
tell app "System Events" to tell process "xxxx"
>
set frontmost to true
>
keystroke "a"
>
end
System Events 1.2 - which you can only at the moment get as a Pre-Release
extra to DeveloperToolsDec2002 if you join Apple Developer Connection
(free). And then you have to go to System Preferences/Universal Access/Turn
on "Enable access for assistive devices".
So, until System Events 1.2 becomes part of the standard OS (hopefully in OS
10.3), you won't be able to depend on users other than yourself being able
to run this script.
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.