codebegins Posted January 20, 2018 Share Posted January 20, 2018 This beautiful script does what it does, spamming left mouse clicks - but it can't be stopped. How to stop it? Both ESC and Pause do not seem to work Quote Global $Paused, $counter = 0 HotKeySet("{PAUSE}", "Pause") HotKeySet("{ESC}", "Beenden") While 1 MouseClick("left") WEnd Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) WEnd EndFunc Func Terminate() Exit 0 EndFunc Much appreciated Best regards! Link to comment Share on other sites More sharing options...
Developers Jos Posted January 20, 2018 Developers Share Posted January 20, 2018 AutoIt3 is pretty clever but doesn't do translations or guessing as yet! These lines set the Func to be performed when that key is pressed..... where are they? HotKeySet("{PAUSE}", "Pause")HotKeySet("{ESC}", "Beenden") ps: This feels like a game automation script so please ensure you familiarize yourself with our forum rules! Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Simpel Posted January 20, 2018 Share Posted January 20, 2018 Hi. Your names of the functions Func ...() had to match the names of the functions inside your HotKeySet(...). Conrad SciTE4AutoIt = 3.7.3.0 AutoIt = 3.3.14.2 AutoItX64 = 0 OS = Win_10 Build = 19044 OSArch = X64 Language = 0407/german H:\...\AutoIt3\SciTE H:\...\AutoIt3 H:\...\AutoIt3\Include (H:\ = Network Drive) Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. Link to comment Share on other sites More sharing options...
codebegins Posted January 20, 2018 Author Share Posted January 20, 2018 34 minutes ago, Simpel said: Hi. Your names of the functions Func ...() had to match the names of the functions inside your HotKeySet(...). Conrad I knew it!! I got into programming lately and start to understand more and more See it like this: You are a child and hear your parents talking and you repeat what they say, not knowing the Meaning and what it Does, what effect it has. Same with programming language. I want to do something, someone tells me "this is it". I copy paste it, not knowing what it does, and it then being incomplete gives all sorts of problems. Now I have to understand what it actually means, to make it perfect. That is great learning. How would this look like, in this example, so I can then understand it correctly? Simply giving me the terms in a copy-paste fashion, doesnt really make me learn more Can you assist with both briefly? Link to comment Share on other sites More sharing options...
Simpel Posted January 20, 2018 Share Posted January 20, 2018 (edited) Hi. To make it clear: Global $Paused ; means $Paused = FALSE HotKeySet("{PAUSE}", "Pause") ; here you call Pause() HotKeySet("{ESC}", "Beenden") ; here you call Beenden() While 1 MouseClick("left") WEnd Func Pause() ; you named it TogglePause() but should be Pause() $Paused = NOT $Paused ; here you always toogle between $Paused = FALSE and $Paused = TRUE While $Paused ; means loop as long $Paused = TRUE sleep(100) WEnd EndFunc Func Beenden() ; you named it Terminate() but should be Beenden() Exit 0 EndFunc Got it? Conrad P.S. If you post code please don’t use the tags quote but tags code (this is this button: <>). Edited January 20, 2018 by Simpel P.S. SciTE4AutoIt = 3.7.3.0 AutoIt = 3.3.14.2 AutoItX64 = 0 OS = Win_10 Build = 19044 OSArch = X64 Language = 0407/german H:\...\AutoIt3\SciTE H:\...\AutoIt3 H:\...\AutoIt3\Include (H:\ = Network Drive) Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted January 20, 2018 Moderators Share Posted January 20, 2018 @codebegins As has been asked more than once now, what is your click script being used for (app or website)? Part of the issue is that MouseClick is inherently unreliable; there are 100 better ways to do it. But without a detailed explanation of what you're trying to accomplish, we can't exactly help. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
careca Posted January 21, 2018 Share Posted January 21, 2018 In my view, the clicks are not going to pause that way. But i won't give any input until mods say ok. Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe Link to comment Share on other sites More sharing options...
codebegins Posted January 21, 2018 Author Share Posted January 21, 2018 Thank you for your replies Something isn't right with the logic in this script.. 37 minutes ago, careca said: In my view, the clicks are not going to pause that way. But i won't give any input until mods say ok. what do you want to post and need an okay for? Has this something to do Jos was writing about regarding forum rules? Sorry, I'm completely new Link to comment Share on other sites More sharing options...
careca Posted January 21, 2018 Share Posted January 21, 2018 The thing is, if a moderator has asked something, and the op didn't give any answer, other people shouldn't post anything else unless the mod says it's ok. In this case, the mod asked what is this for, so until he gets an answer and gives the ok, no one should reply anymore. Been there, done that. Earthshine and Danp2 2 Spoiler Renamer - Rename files and folders, remove portions of text from the filename etc. GPO Tool - Export/Import Group policy settings. MirrorDir - Synchronize/Backup/Mirror Folders BeatsPlayer - Music player. Params Tool - Right click an exe to see it's parameters or execute them. String Trigger - Triggers pasting text or applications or internet links on specific strings. Inconspicuous - Hide files in plain sight, not fully encrypted. Regedit Control - Registry browsing history, quickly jump into any saved key. Time4Shutdown - Write the time for shutdown in minutes. Power Profiles Tool - Set a profile as active, delete, duplicate, export and import. Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes. NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s. IUIAutomation - Topic with framework and examples Au3Record.exe 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