Keyboard > Mouse Click

Joined
Sep 2, 2010
Messages
8
Reaction score
0
Points
1
when i used windows i used AutoHotKey to allow me to press a key and it would jump to co-ordinate that i had set and perform a mouse click.

I was wondering is there any functionality on a mac?

Thanks
 
Joined
May 14, 2009
Messages
2,052
Reaction score
136
Points
63
Location
Near Whitehorse, Yukon
Your Mac's Specs
2012 MBP i7 2.7 GHz 15" Matte - 16 GB RAM - 120 GB Intel SSD - 500 GB DataDoubler Mac OS 10.9
Welcome to M-F!

Have a look at QuickKeys, it can click and do a lot of other things.
Startly - QuicKeys4 for Mac OS X
It could be done with Applescript but then you would have no way of calling it with a keyboard shortcut.
 
OP
K
Joined
Sep 2, 2010
Messages
8
Reaction score
0
Points
1
i have set up and installed Quickeys. it works perfectly.

is there no free alternative to it. i dont really want to pay for it to do such basic task.
 
Joined
May 14, 2009
Messages
2,052
Reaction score
136
Points
63
Location
Near Whitehorse, Yukon
Your Mac's Specs
2012 MBP i7 2.7 GHz 15" Matte - 16 GB RAM - 120 GB Intel SSD - 500 GB DataDoubler Mac OS 10.9
Should have looked at the price first, wow kinda expensive.

The free version
Download Spark for Mac, free hotkey shortcuts manager.

Open it an make a new applescript shortcut (Command+1).
Paste in this code in the source tab and press the check button. The code will color format itself.
You will need to change the coordinates/application depending on where you want to use it.
The coordinates can be found by using the screenshot tool, command+shift+4
The top coordinate is the first in the applescript, bottom is the second.
tell application "System Events"
try
tell application process "Safari"
click (click at {800, 500})
end tell
end try
end tell

Add the shortcut you want to use for this script, it's name and create it.
The way the script is now it will on MacUpdate on the application description page click on the image to show it in large.
 
OP
K
Joined
Sep 2, 2010
Messages
8
Reaction score
0
Points
1
hmm.. i followed your guide and i have set the shortcut to be f1 but it doesnt do anything.

I am using Safari as you set in the script

it seems to switch over the safari but doesnt click
 
Joined
May 14, 2009
Messages
2,052
Reaction score
136
Points
63
Location
Near Whitehorse, Yukon
Your Mac's Specs
2012 MBP i7 2.7 GHz 15" Matte - 16 GB RAM - 120 GB Intel SSD - 500 GB DataDoubler Mac OS 10.9
Try this,
Code:
tell application "Safari"
	activate
end tell

tell application "System Events"
	try
		tell application process "Safari"
			delay 1
			click at {800, 500}
		end tell
	end try
end tell
I've modified the script a bit, it will now switch to Safari first and then click.
I also found out that I was double clicking in the first script I posted, so I fixed that too.
 
OP
K
Joined
Sep 2, 2010
Messages
8
Reaction score
0
Points
1
I have it all sorted now.

I used Cliclick and fastscript

Thanks for help anyway
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top