Automator question

Discussion in 'Mac Apps and Mac App Store' started by one1, Sep 10, 2007.

  1. one1 macrumors 65816

    Joined:
    Jun 17, 2007
    Location:
    Chattanooga, TN
    #1
    Is there a way I can make automator click my mouse?

    I want to put my mac on a specific page and hover the mouse over a button and have automator click it every say.......25 seconds. I can't let this page I am working on time out and this is the only way I can do what I need to do.
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    Are you sure doing a mouse click will actually keep the page from timing out? From what I could find Automator can't simulate mouse clicks on its own. I tried finding a way with Applescript, but couldn't figure it out, though I believe there is a way. Alternatively, it may work to have the application just do something every so often. The below is an Applescript that will do a "cmd+." action, which isn't a valid shortcut, but will give an action. I don't know if it'll do what you need, but could be worth a try.

    Just put the code into the "Script Editor" program and save. It'll repeat infinitely so you'll face to manually quit it.

    Code:
    repeat
    	tell application "Firefox" to activate
    	tell application "System Events"
    		tell process "Firefox"
    			keystroke "." using {command down}
    		end tell
    	end tell
    	delay 25
    end repeat
     
  3. one1 thread starter macrumors 65816

    Joined:
    Jun 17, 2007
    Location:
    Chattanooga, TN
    #3
    Thank you for the response. :) I can go as far as to open the safari, put it on the page, and set the mouse in the correct spot as normal, I just can't figure out how to make the mouse trigger to click the button that keep this session open. I have to find a way to click the mouse button and was hoping not to have to do this with some Go-Go Gadget physical machine punching the mouse. (LOL) I will eventually come to this however if nothing else as I must click this button.
     

Share This Page