Skip navigation

OSA script help in ARD...mouse click

637 Views 1 Reply Latest reply: Jan 27, 2013 10:37 PM by TeenTitan RSS
brandnew2macbook Level 1 Level 1 (0 points)
Currently Being Moderated
Jan 14, 2013 8:43 AM

Hello,

 

Lets say I want to use ARD (3.6.1) from my macbook air to click on a specific part of the screen on a 10.7.5 mac air. 

 

I have found this osascript but it does not work. Lets say I want it to click at {330,220} in Pages.

 

osascript -e 'tell application "System Events" to tell process "Directory Access" to click at {x,y}'

 

I have tried changing "Directory Access" to the program I am running, "Pages" but that does not work. I am also running command as root.

 

Any suggestions?

ARD, Mac OS X (10.7.5), ARD remote log in failure
  • TeenTitan Level 4 Level 4 (2,410 points)
    Currently Being Moderated
    Jan 27, 2013 10:37 PM (in response to brandnew2macbook)

    If you google around, you can probable find allot of unix scripts out there to do most of what you can do in Directory Access. (enable root, enable/bind to a directory service, map attributes, extra) and they would be faster and more reliable then trying to perform that action at the finder level with emulate mouse clicks.

     

    FYI Not all process support the to click at funtion of applescript.

     

    Another option some times is to script actions by the GUI elements which isn't relient on the window being in exactly the right spot to work. BUT again it's easier to do allot of this stuff at the unix/command base level.

     

    What are you trying to do with Directory Access?

     

    If you want to use applescript, have you tried some thing you know should work like:

    activate application "AppleScript Editor"

    tell application "System Events" to tell process "AppleScript Editor" to click at {0, 0}

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.