Hakon Posted March 4, 2008 Share Posted March 4, 2008 (edited) Hey.. I'm not that good at AutoIt..but i'm learning slowly I would like to make a script that when the hotkey is pressed it the mouse moves to a point on the screen and click. Like if ALT and B is pressed the mouse moves to (500,500) and click. This didn't work, but can i use something like this? HotKeySet("{alt}{b}", mousemove(500,500)(mouseclick("left")) I have searched and tryed to find something that would help me..but no luck.. Thanks for all help i get. Edited March 4, 2008 by Hakon Link to comment Share on other sites More sharing options...
igotandrew Posted March 4, 2008 Share Posted March 4, 2008 For the hotkey, unless your doing something special you should use !b Your close, I don't think that can work, so what I recommend doing is making a function, then binding that to the hotkey: HotKeySet("!b", "exFunc") Func exFunc() MouseClick("left", 500, 500, 1, 1) ; change speed as needed EndFunc Link to comment Share on other sites More sharing options...
Hakon Posted March 4, 2008 Author Share Posted March 4, 2008 When i run the script it just exit itself.. Is something wrong? Link to comment Share on other sites More sharing options...
igotandrew Posted March 4, 2008 Share Posted March 4, 2008 OOOPS. My bad, forgot to add this thing HotKeySet("!b", "exFunc") HotKeySet("{ESC}", "Quit") While 1 ; Permanently loops Sleep(100) Wend Func Quit() Exit 1 ;Quits the script EndFunc Func exFunc() MouseClick("left", 500, 500, 1, 1) ; change speed as needed EndFunc Link to comment Share on other sites More sharing options...
Hakon Posted March 4, 2008 Author Share Posted March 4, 2008 (edited) Thank you so much! It works perfectly now Edited March 4, 2008 by Hakon 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