• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Click and Drag using UI scripting?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: IE POST format
  • Next by Date: Re: Click and Drag using UI scripting?
  • Previous by thread: Click and Drag using UI scripting?
  • Next by thread: Re: Click and Drag using UI scripting?
  • Index(es):
    • Date
    • Thread