spiderous Posted July 11, 2005 Share Posted July 11, 2005 Ok, I read the help files and saw how to set them but Its like reading russian in the dark to me. I don't know what it means. My script is this While 1 sleep(250) mouseclick() Wend this was kindly posted by another user on this forum, who kindly told me I should be posting here. I just want to add a start and stop key to the script. can anyone help me? Link to comment Share on other sites More sharing options...
GaryFrost Posted July 11, 2005 Share Posted July 11, 2005 HotKeySet("{Home}","_MClick") HotKeySet("{End}","_StopLoop") HotKeySet("{ESC}","_Exit") While 1 Sleep (10) Wend Func _Exit() Exit EndFunc Func _StopLoop() $Loop = 0 EndFunc Func _MClick() $Loop = 1 While $Loop sleep(250) mouseclick() Wend EndFunc SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
spiderous Posted July 11, 2005 Author Share Posted July 11, 2005 HotKeySet("{Home}","_MClick") HotKeySet("{End}","_StopLoop") HotKeySet("{ESC}","_Exit") While 1 Sleep (10) Wend Func _Exit() Exit EndFunc Func _StopLoop() $Loop = 0 EndFunc Func _MClick() $Loop = 1 While $Loop sleep(250) mouseclick() Wend EndFunc<{POST_SNAPBACK}> You are a King among men, my friend. Thank you Link to comment Share on other sites More sharing options...
spiderous Posted July 11, 2005 Author Share Posted July 11, 2005 (edited) Its not clicking fast enough I need about 4 clicks per second. How do i speed it up? Edited July 11, 2005 by spiderous Link to comment Share on other sites More sharing options...
GaryFrost Posted July 11, 2005 Share Posted July 11, 2005 MouseClick("left") SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
spiderous Posted July 11, 2005 Author Share Posted July 11, 2005 (edited) It starts paused, And Home or anyother key does not unpause it. I trying to make a macro where a left mouse is clicking about 4-5 times per second with a loop and hot keys. Dont know if What I have is right. THis is what I have HotKeySet("{Home}","_MClick") HotKeySet("{End}","_StopLoop") HotKeySet("{ESC}","_Exit") While 1 Sleep (10) Wend Func _Exit() Exit EndFunc Func _StopLoop() $Loop = 0 EndFunc Func _MClick() $Loop = 1 While $Loop sleep(250) mouseclick() Wend EndFunc It sends an error also saying no paremiter in mouseclick () Edited July 11, 2005 by spiderous Link to comment Share on other sites More sharing options...
DarkNecromancer Posted July 11, 2005 Share Posted July 11, 2005 i dont know if this would work, because ive never used it, but you could try creating a while loop, then in the while loop have it clickin and in there with it have an adlib linking to a clicking function, sense you can set how fast the adlib runs you can make it as fast as you need it. Link to comment Share on other sites More sharing options...
GaryFrost Posted July 11, 2005 Share Posted July 11, 2005 Now start with it running. End Key to stop mouse clicks Home Key to start mouse clicks Esc key to exit script HotKeySet("{Home}","_MClick") HotKeySet("{End}","_StopLoop") HotKeySet("{ESC}","_Exit") $Loop = 1 _MClick() While 1 Sleep (10) Wend Func _Exit() Exit EndFunc Func _StopLoop() $Loop = 0 EndFunc Func _MClick() $Loop = 1 While $Loop sleep(250) mouseclick("left") Wend EndFunc SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Swimming_Bird Posted July 11, 2005 Share Posted July 11, 2005 how do you go about making a "pause" hotkey that will suspend using any hotkey but the one set to pause and unpause? Link to comment Share on other sites More sharing options...
WHRobin566 Posted July 12, 2005 Share Posted July 12, 2005 (edited) $unpause = 0 Hotkeyset("{F1}", "PAUSE") Hotkeyset("{F2}", "UNPAUSE") func PAUSE() while 1 if $unpause = 1 then exitloop endif sleep(10) wend endfunc func UNPAUSE() $unpause = 1 endfunc I think that will work. Never made a pause script before. ok well a pause scipt to stop hotkeys would be hotkeyset("somekey", "somefunc") hotkeyset("somekey", "somefunc") hotkeyset("somekey", "somefunc") hotkeyset("somekey", "somefunc") hotkeyset("{F1}", "PAUSE") hotkeyset("{F2}", "UNPAUSE") func PAUSE() hotkeyset("somekey") hotkeyset("somekey") hotkeyset("somekey") hotkeyset("somekey") endfunc func UNPAUSE() hotkeyset("somekey", "somefunc") hotkeyset("somekey", "somefunc") hotkeyset("somekey", "somefunc") hotkeyset("somekey", "somefunc") endfunc That would pause they hotkeys. just replace the somekeys and somefunc. Edited July 12, 2005 by WHRobin566 Witch Hunter Robin Link to comment Share on other sites More sharing options...
LxP Posted July 12, 2005 Share Posted July 12, 2005 Just to slightly improve on WHRobin's code so that you only need to define the hotkeys once: hotkeySet("{F1}", "pause") hotkeySet("{F2}", "unpause") unpause() func pause() hotkeySet("someKey") hotkeySet("someKey") hotkeySet("someKey") hotkeySet("someKey") endFunc func unpause() hotkeySet("someKey", "someFunc") hotkeySet("someKey", "someFunc") hotkeySet("someKey", "someFunc") hotkeySet("someKey", "someFunc") endFunc 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