Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Move and click the mouse via code' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Move and click the mouse via code
Authored by: ob1cannoli on May 14, '08 10:09:45AM
Not to say your work is useless, but this works well for me:

activate application "Finder"
tell application "System Events"
	tell process "Finder"
		click at {15, 2}
	end tell
end tell


[ Reply to This | # ]
Move and click the mouse via code
Authored by: ghay on May 14, '08 10:17:04AM

Do you have "Enable Access for Assistive Devices" checked in your "Universal Access" system preferences?



[ Reply to This | # ]
Move and click the mouse via code
Authored by: ob1cannoli on May 14, '08 10:30:19AM

Yup. I'm on 10.5 and using an macbook/external monitor if that makes a difference..



[ Reply to This | # ]
Move and click the mouse via code
Authored by: ghay on May 14, '08 12:08:56PM

Your script will work with the setting on, but you are more than likely out of luck with it off, the original hint will work regardless.

Also, I haven't tested if telling the finder (or even system events) to click will work across into other applications.



[ Reply to This | # ]
Would this work outside of the Finder?
Authored by: jecwobble on May 14, '08 11:20:58AM

I would think that if you are in another active application that you want to click on, that activating the Finder would deactive the window you need the script to opperate on...



[ Reply to This | # ]
Move and click the mouse via code
Authored by: lotusone on Jul 27, '09 07:04:05PM

As mentioned in the post, this is for Apps that do not use standard Cocoa UI elements and thus can not be scripted using "click at." Finder is a Cocoa app, so this is not necessary, but try using "click at" on a web page in Safari using a Flash control and you'll be tearing your hair out.



[ Reply to This | # ]