Ramion Posted March 24, 2006 Share Posted March 24, 2006 All I want this to do is, is that if I hit F11 on my keyboard, the script will stop, and if I hit F12 on my keyboard, it'll start again. This is my script: Do MouseClick("left", 199,236) Until 1 = 0 Simple huh. Link to comment Share on other sites More sharing options...
The Kandie Man Posted March 24, 2006 Share Posted March 24, 2006 You can't assign a hotkey to F12. Windows doesn't allow it. global $mouseclick = False HotKeySet("{F10}","Start") HotKeySet("{F11}","Stop") while 1 If $mouseclick = True Then MouseClick("left", 199,236) Endif ;you may want to add the following line of code to the script so that it doesn't hog your CPU ;sleep(10) wend Func Start() $mouseclick = True EndFunc Func Stop() $mouseclick = False EndFunc "So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire Link to comment Share on other sites More sharing options...
Ramion Posted March 24, 2006 Author Share Posted March 24, 2006 it says: global $mouseclick = False global $mouseclick = ^ ERROR Unknown function name. thats suppose to run for Autoit v3 right? Link to comment Share on other sites More sharing options...
The Kandie Man Posted March 24, 2006 Share Posted March 24, 2006 Oh sorry. I wrote it for the beta version of autoit which supports boolean values. Let me fix it: global $mouseclick = "False" HotKeySet("{F10}","Start") HotKeySet("{F11}","Stop") while 1 If $mouseclick = "True" Then MouseClick("left", 199,236) Endif ;you may want to add the following line of code to the script so that it doesn't hog your CPU ;sleep(10) wend Func Start() $mouseclick = "True" EndFunc Func Stop() $mouseclick = "False" EndFunc "So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire Link to comment Share on other sites More sharing options...
Ramion Posted March 24, 2006 Author Share Posted March 24, 2006 Oh sorry. I wrote it for the beta version of autoit which supports boolean values. Let me fix it:Thanks a bunch dude it works Link to comment Share on other sites More sharing options...
Nuffilein805 Posted March 24, 2006 Share Posted March 24, 2006 you can use f12 if you want (for either start or stop - i used it for stop) just try this global $mouseclick = "False" HotKeySet("{F11}","Start") while 1 If $mouseclick = "True" Then MouseClick("left", 199,236) Endif ;you may want to add the following line of code to the script so that it doesn't hog your CPU ;sleep(10) if _ispressed ("7B") then stop(); <---- only works with beta wend Func Start() $mouseclick = "True" EndFunc Func Stop() $mouseclick = "False" EndFunc only works with beta my little chatmy little encryption toolmy little hidermy unsafe clickbot 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