Easy Automator Script?

Discussion in 'Mac Programming' started by CylonGlitch, Aug 12, 2014.

  1. CylonGlitch macrumors 68030

    CylonGlitch

    Joined:
    Jul 7, 2009
    Location:
    SoCal
    #1
    I'm sorry, I'm a noob at automator, but I'm looking for a way to automate clicking a button once an hour. Maybe move the mouse to the location and then click. Anyone know how to do this?
     
  2. superscape, Aug 13, 2014
    Last edited: Aug 13, 2014

    superscape macrumors 6502a

    superscape

    Joined:
    Feb 12, 2008
    Location:
    East Riding of Yorkshire, UK
    #2
    Hi,

    If you really want to simulate a manual click on a button then you probably want to take a look at UI Scripting using AppleScript. I'm no expert on it but there's a guide here:

    http://www.macosxautomation.com/applescript/uiscripting/

    From my personal experience, UI Scripting is glitchy, clumsy and confusing and I'll use it as an absolute last resort.

    I'd suggest that you're better off looking at the Scripting Dictionary of the app whose button you're trying to click. Maybe you'll be able to achieve whatever clicking the button does using a cunningly crafted AppleScript without having to simulate the actions of a user. If so then I'd take that route.

    It's hard to say more than that without knowing what app the button in question belongs to, and what you're trying to achieve.

    Hope that's of some help!

    ps. I think the way you enable assistive devices changed in 10.9 so some instructions may be wrong!
     
  3. ArtOfWarfare macrumors 604

    ArtOfWarfare

    Joined:
    Nov 26, 2007
    #3
    If it's a standard Cocoa app there's probably an easier way of accessing a button at a certain index in a certain window than moving the mouse and clicking.
     

Share This Page