Re: Move cursor with Applescript
Re: Move cursor with Applescript
- Subject: Re: Move cursor with Applescript
- From: Robert Poland <email@hidden>
- Date: Sat, 3 Apr 2010 14:28:17 -0600
Thanks Craig,
Looks like the way to go.
However the instructions for installing Cliclick are over my head.
"Put cliclick anywhere you like. The best (i.e.: most common) place would probably be /usr/local/bin"
I tried the Application folder and the Universal Scripts folder.
I also tried looking for /usr/local/bin with sherlock, etc.
I tried iShow Invisible but that gave me too many options.
Any other suggestions?
On Apr 3, 2010, at 12:53 PM, Craig Williams wrote: I'm trying to change an iKey function to a script.
(* ClickZoomBox - 4/3/10 *) tell application "System Events" Move cursor to 57,12 (T/L) click -- click left mouse button end tell
ex. do shell script "cliclick 51 17"
If you only want to move the mouse and not perform a click then you can use CGWarpMouseCursorPosition().
Here is an example using MacRuby but you could easily turn this into a command line utility. set x to 57 set y to 12 do shell script "/usr/local/bin/macruby -e \"framework 'carbon'\" -e \"framework 'ApplicationServices'\" -e \"CGWarpMouseCursorPosition(CGPointMake(" & x & "," & y & "))\""
Robert Poland - Fort Collins, CO
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden