Re: Click and Drag using UI scripting?
Re: Click and Drag using UI scripting?
- Subject: Re: Click and Drag using UI scripting?
- From: Brett Kirksey <email@hidden>
- Date: Tue, 16 Sep 2003 15:18:55 -0400
Marconi wrote:
>
Is there a way, perhaps using UI scripting, to click and drag from
>
one point to another?
The dictionary for System Events 1.2 contains:
click: cause the target process to behave as if the UI
element were clicked
click reference -- the object for the command
[at list] -- when sent to a "process" object,
the { x, y } location at which to click, in global coordinates
As far as dragging, I'm not sure. Maybe the 'move' command would work?
>
Would a Click-Drag have to be directed to a particular app which
>
supports click/drag or can a generic click/drag be done which will
>
direct the click and release to whatever apps happen to be under the
>
cursor at click and release time?
If you use this code, you can direct the action to whatever is the frontmost application:
tell application "System Events"
set theProcess to every process whose frontmost is true
tell process theProcess
-- whatever you want
end tell
end tell
--
Brett
_______________________________________________
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.