cubancigar Posted December 29, 2007 Share Posted December 29, 2007 (edited) Hi, I was trying to get scripts to run when one of the keys on the keyboard is hit. MouseClick ( "left" ) sleep(500) MouseClick ( "left" ) This one is for emulating a double click, giving the mouse finger an alternative means. I compiled this into an exe and it causes the mouse to double click but how to "tie" a keyboard button to it. Edited December 29, 2007 by cubancigar Link to comment Share on other sites More sharing options...
herewasplato Posted December 29, 2007 Share Posted December 29, 2007 Welcome to the forum. HotKeySet("+z", "_DC") ;Shift-z While 1 Sleep(100) WEnd Func _DC() MouseClick("left") Sleep(500) MouseClick("left") EndFunc ;==>_DCCheck out the help file under HotKeySet. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
cubancigar Posted December 29, 2007 Author Share Posted December 29, 2007 it worked! this is looking great right off the bat. thanks for the helpful post Link to comment Share on other sites More sharing options...
cubancigar Posted December 29, 2007 Author Share Posted December 29, 2007 (edited) HotKeySet("{NUMPAD0}", "goonce") HotKeySet("{NUMPAD1}", "goinspace") HotKeySet("{ESC}", "Terminate") $going = True While 1 Sleep(100) WEnd Func goonce() MouseClick("left") Sleep(500) MouseClick("left") EndFunc ;==>goonce Func goinspace() $going = True While 1 MouseClick("left") Sleep(500) if not $going then exitloop MouseClick("left") Sleep(500) if not $going then exitloop WEnd EndFunc ;==>goinspace Func Terminate() $going = False EndFunc This one will double click once when keypad 0 is pressed. When keypad1 is hit it will go into a cycle of clicking untill you hit escape which resets it. I love you autoit, wtf have i been doing all these years. Now hopefully this thing works in linux Edited December 29, 2007 by cubancigar Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now