Bert Posted April 15, 2015 Share Posted April 15, 2015 This is a script that reproduces the problem. The issue is with line 75. If mousemove is set to 1, the click occurs. If set to 0, it is skipped. I put in hotsetkeys to change the move value. When running the script: "q" will start the mouseclick pattern "w" will set the move to 1 "e" will set the move to 0 "r" will stop the pattern. the esc key will exit the script. notepad will open and size itself. It has to be active for the mouseclick pattern to run. script: expandcollapse popupopt("Wintitlematchmode", 2) $u=0 $p=0 $z = 864 $c = 493 $L = 1 HotKeySet("{esc}", "exitProgram") dim $qwe = "Untitled - Notepad" $np = WinExists($qwe) IF $np = 0 then run("Notepad.exe") winmove($qwe, "", 522, 107, 911, 626, 0) EndIf while 1 $e = WinActive("Untitled - Notepad","") If $e <> 0 then clickactive() endif If WinActive("Untitled - Notepad","") = 0 then resetkey() endif sleep(100) wend Func clickactive() HotKeySet("q", "xxx") HotKeySet("r", "xxx2") HotKeySet("w", "xxx3") HotKeySet("e", "xxx4") EndFunc Func resetkey() HotKeySet("q") HotKeySet("r") HotKeySet("w") HotKeySet("e") EndFunc Func xxx3() $L = 1 EndFunc Func xxx4() $L = 0 EndFunc Func xxx() $u = 1 clicker() EndFunc FUnc xxx2() $u = 0 EndFunc Func clicker() $d = $c $z2 = $z if $u= 1 then while 1 If WinActive($qwe,"") <> 0 then Do MouseClick("left",$z2 , $d, 1, 0) $d = $d + 20 until $d = 473 + 200 endif If WinActive($qwe,"") = 0 then ExitLoop $pp = 1 If $u = 0 then ExitLoop $d = $c $z2 = $z2 + 30 if $z2 > 1260 then $z2 = $z MouseClick("left",736, 643,$L) ;bug is here. If I set the move to 0, the click is skipped sleep(500) EndIf WEnd endif EndFunc Func exitProgram() Exit EndFunc The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Bert Posted April 15, 2015 Author Share Posted April 15, 2015 I'm running the script on a Windows 7 - 64 bit machine. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Solution kylomas Posted April 15, 2015 Solution Share Posted April 15, 2015 Bert, MouseClick("left", 736, 643, $L) ;bug is here. If I set the move to 0, the click is skipped $L is the number of times to click. Is that your intent? kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
Bert Posted April 16, 2015 Author Share Posted April 16, 2015 good catch. Thanks. that was it. If set to 0 for the number of clicks then it will skip the click. The Vollatran project My blog: http://www.vollysinterestingshit.com/ 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