Applescript

Discussion in 'Mac OS X Lion (10.7)' started by jamesadrian, Mar 24, 2012.

  1. jamesadrian macrumors member

    Joined:
    Aug 18, 2010
    Location:
    Rochester, NY 14626
    #1
    I have been looking for a script or an expert that would lead me to an applescript that moves the cursor upon startup and clicks. I know how to include an applescript in the Login Items, but I haven't found anything helpful concerning the script, short of learning the whole language. I don't know if the keyword is "mouse", "cursor", "pointer" or something else.

    There is a program that I have and need that places an unwanted large logo near the middle of my desktop in the same place every time I turn on my computer (iMac OS X version 10.7.3). It is redundant and it bothers me. I need to click it away each time. Once this problem is solved, I will probably not need applescript ever again.

    Any leads would be greatly appreciated.

    Thank you for your help.

    James Adrian
    jim@futurebeacon.com
     
  2. MacGrunt macrumors newbie

    MacGrunt

    Joined:
    Jul 25, 2011
    #2
    G'day

    you can use system events to perform a mouse click :
    Code:
    tell application "System Events"
    	tell process "(name-of-your-application)"
    		click at {800, 500} -- (coordinates from top left of screen)
    	end tell
    end tell
    to find the exact name of your app (process) you can run this — and then just copy it from the results window :
    Code:
    tell application "System Events"
    	get every process
    end tell
    to find the exact location of the point you need to click — go command-shift-4 and draw a box from the very top left corner of your screen. when your cursor is over the point you need, just take note of the coordinates listed there. (note: this places a screen grab on your desktop too — which you'll probably want to delete).

    hope that's what you're looking for.

    m.
     

Share This Page