Engineer Posted August 31, 2011 Share Posted August 31, 2011 I wrote a program about 300 lines long. all mouse clicks and sleeps. the problem is it stops at about line 50 or so. Naturaly I'm angry. I could split it up and make the end of each program activate the next bit, but thats something I'd rather avoid. the sleeps are 1 second long between each. I'm wondering if there is any unsaid rule about mouseclick. >Process failed to respond; forcing abrupt termination... >Exit code: 1 Time: 300.110 Link to comment Share on other sites More sharing options...
rcmaehl Posted August 31, 2011 Share Posted August 31, 2011 (edited) Can you please post your code. I'll check it out. EDIT: RCMAEHL Headshot Typo Edited August 31, 2011 by rcmaehl My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.My Projects WhyNotWin11Cisco Finesse, Github, IRC UDF, WindowEx UDF Link to comment Share on other sites More sharing options...
Engineer Posted August 31, 2011 Author Share Posted August 31, 2011 MouseClick("left", 653, 781, 1, 0) Sleep (1000) MouseClick("left", 757, 699, 1, 0) Sleep (1000) MouseClick("left", 653, 781, 1, 0) Sleep (1000) MouseClick("left", 761, 719, 1, 0) sleep(600000) ;----------------------------------------------- MouseClick("left", 1037, 993, 2, 0) Sleep (1000) MouseClick("left", 1040, 952, 2, 0) Sleep (1000) MouseClick("left", 483, 160, 2, 0) Sleep (1000) MouseClick("left", 490, 274, 2, 0) Sleep (1000) MouseClick("left", 220, 278, 2, 0) Sleep (1000) MouseClick("left", 1037, 993, 2, 0) Sleep (1000) MouseClick("left", 1040, 952, 2, 0) Sleep (1000) MouseClick("left", 483, 160, 2, 0) Sleep (1000) MouseClick("left", 490, 274, 2, 0) Sleep (1000) MouseClick("left", 325, 330, 2, 0); sleep(40000) ;----------------------------------------------- I was underestimating how much I wrote. 400 lines of this. just goes on like this till it ends. mouse click, wait, then repeat as you can see on the second set of codes its supposed to click twice. I'm really at a loss of what to do. Link to comment Share on other sites More sharing options...
monoscout999 Posted August 31, 2011 Share Posted August 31, 2011 seeing this i dont noticed any error... but you can save it a lot of lines making loops using as example the code that you post here While True MouseClick("left", 653, 781, 1, 0) Sleep(1000) MouseClick("left", 757, 699, 1, 0) Sleep(1000) MouseClick("left", 653, 781, 1, 0) Sleep(1000) MouseClick("left", 761, 719, 1, 0) Sleep(600000) For $i = 0 To 1 MouseClick("left", 1037, 993, 2, 0) Sleep(1000) MouseClick("left", 1040, 952, 2, 0) Sleep(1000) MouseClick("left", 483, 160, 2, 0) Sleep(1000) MouseClick("left", 490, 274, 2, 0) Sleep(1000) Switch $i Case 0 MouseClick("left", 220, 278, 2, 0) Case 1 MouseClick("left", 325, 330, 2, 0) EndSwitch Sleep(1000) Next Sleep(40000) WEnd I imagine that there is to much repetition in the rest of the code, maybe something like this will short the code Link to comment Share on other sites More sharing options...
rcmaehl Posted August 31, 2011 Share Posted August 31, 2011 seeing this i dont noticed any error... but you can save it a lot of lines making loops using as example the code that you post here While True MouseClick("left", 653, 781, 1, 0) Sleep(1000) MouseClick("left", 757, 699, 1, 0) Sleep(1000) MouseClick("left", 653, 781, 1, 0) Sleep(1000) MouseClick("left", 761, 719, 1, 0) Sleep(600000) For $i = 0 To 1 MouseClick("left", 1037, 993, 2, 0) Sleep(1000) MouseClick("left", 1040, 952, 2, 0) Sleep(1000) MouseClick("left", 483, 160, 2, 0) Sleep(1000) MouseClick("left", 490, 274, 2, 0) Sleep(1000) Switch $i Case 0 MouseClick("left", 220, 278, 2, 0) Case 1 MouseClick("left", 325, 330, 2, 0) EndSwitch Sleep(1000) Next Sleep(40000) WEnd I imagine that there is to much repetition in the rest of the code, maybe something like this will short the code I concur. Using a loop within the loop can greatly help your script. My UDFs are generally for me. If they aren't updated for a while, it means I'm not using them myself. As soon as I start using them again, they'll get updated.My Projects WhyNotWin11Cisco Finesse, Github, IRC UDF, WindowEx UDF Link to comment Share on other sites More sharing options...
Engineer Posted August 31, 2011 Author Share Posted August 31, 2011 Thanks for the advice, but I'm still worried the same out come will happen. it stoping at line 50 in a 400 line code just cannot happen. especially when I start distrubition. having 20 people come out and say fix this isn't going to be pretty. Link to comment Share on other sites More sharing options...
monoscout999 Posted August 31, 2011 Share Posted August 31, 2011 attach the entire script, because i don`t see anything wrong in what you post 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