JohnOne Posted April 18, 2010 Share Posted April 18, 2010 CHRIST ON A BIKE !!! Wheres the error checking pal ?? Donr make me open this bottle of whishey AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
ArmandoXS Posted April 18, 2010 Author Share Posted April 18, 2010 (edited) $i=0 While $i=0 $minicord=PixelSearch(770,132,857,220,0xA58629,5,3) If Not @error Then MouseClick("left",$minicord[0],$minicord[1],1,1) Sleep(100) EndIf If @error Then $travelx=Random(770,857,1) $travely=Random(132,220,1) MouseClick("left",$travelx,$travely,1,1) $travel2x=Random(143,878,1) $travel2y=Random(113,669,1) Mouseclick("left",$travel2x,$travel2y,1,1) EndIf If Not @error Then $timer=TimerInit() $cord=PixelSearch(133,103,888,656,0xA58A29,10,10) MouseClick("left",$cord[0],$cord[1],1,1) Sleep(12000) Endif If $timer >= 15000 Then $travelx=Random(770,857,1) $travely=Random(132,220,1) MouseClick("left",$travelx,$travely,1,1) $travel2x=Random(143,878,1) $travel2y=Random(113,669,1) Mouseclick("left",$travel2x,$travel2y,1,1) EndIf WEndCHRIST ON A BIKE !!! Wheres the error checking pal ?? Donr make me open this bottle of whishey o my gosh,,, i dont no wat this error cking is quite yet just look at this Edited April 18, 2010 by DarkDragon Link to comment Share on other sites More sharing options...
ArmandoXS Posted April 18, 2010 Author Share Posted April 18, 2010 (edited) John i think i figured out just now wat u meant u wanted me to put the pixel chk b4 the loop problem being i dont want that pixel chk to happen unless there is no error from the 1st pixel check... hope u understand Edited April 18, 2010 by DarkDragon Link to comment Share on other sites More sharing options...
ArmandoXS Posted April 18, 2010 Author Share Posted April 18, 2010 John i think i figured out just now wat u meant u wanted me to put the pixel chk b4 the loop problem being i dont want that pixel chk to happen unless there is no error from the 1st pixel check... hope u understandwait.. would it change anything if it were out or in Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted April 18, 2010 Share Posted April 18, 2010 John i think i figured out just now wat u meant u wanted me to put the pixel chk b4 the loop problem being i dont want that pixel chk to happen unless there is no error from the 1st pixel check... hope u understandNo he means that you need to check for error after EVERY PixelSearch! .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
JohnOne Posted April 18, 2010 Share Posted April 18, 2010 (edited) $i=0 While $i=0 $minicord=PixelSearch(770,132,857,220,0xA58629,5,3) If Not @error Then MouseClick("left",$minicord[0],$minicord[1],1,1) Sleep(100) EndIf If @error Then $travelx=Random(770,857,1) $travely=Random(132,220,1) MouseClick("left",$travelx,$travely,1,1) $travel2x=Random(143,878,1) $travel2y=Random(113,669,1) Mouseclick("left",$travel2x,$travel2y,1,1) EndIf If Not @error Then $timer=TimerInit() $cord=PixelSearch(133,103,888,656,0xA58A29,10,10) MouseClick("left",$cord[0],$cord[1],1,1) Sleep(12000) Endif If $timer >= 15000 Then $travelx=Random(770,857,1) $travely=Random(132,220,1) MouseClick("left",$travelx,$travely,1,1) $travel2x=Random(143,878,1) $travel2y=Random(113,669,1) Mouseclick("left",$travel2x,$travel2y,1,1) EndIf WEnd o my gosh,,, i dont no wat this error cking is quite yet just look at this Edited April 18, 2010 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted April 18, 2010 Share Posted April 18, 2010 .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
ArmandoXS Posted April 18, 2010 Author Share Posted April 18, 2010 lmao,,, canu tell me wat to fix, CLEARLY!!!!!!! PLEASE!!! Link to comment Share on other sites More sharing options...
ArmandoXS Posted April 18, 2010 Author Share Posted April 18, 2010 No he means that you need to check for error after EVERY PixelSearch!and how do i do that Link to comment Share on other sites More sharing options...
JohnOne Posted April 18, 2010 Share Posted April 18, 2010 (edited) If Not @error Then $timer=TimerInit() $cord=PixelSearch(133,103,888,656,0xA58A29,10,10) If Not @error Then MouseClick("left",$cord[0],$cord[1],1,1) Sleep(12000) Endif EndIf Im sorry but I cand do any better than that, and I think the tags will mess this up. Also, in your code, remember that @error is only valid immedietly adfter the function. so after you have caught it and tell it what to do, if another function is used then your first one has gone. Edited April 18, 2010 by JohnOne AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
ArmandoXS Posted April 18, 2010 Author Share Posted April 18, 2010 If Not @error Then $timer=TimerInit() $cord=PixelSearch(133,103,888,656,0xA58A29,10,10) If Not @error Then MouseClick("left",$cord[0],$cord[1],1,1) Sleep(12000) Endif EndIf Im sorry but I cand do any better than that, and I think the tags will mess this up. Also, in your code, remember that @error is only valid immedietly adfter the function. so after you have caught it and tell it what to do, if another function is used then your first one has gone. OHHHHHHH......... that just cleared up alot of things thanks, ill do some fixes and if i still have problems ill post in this thread Link to comment Share on other sites More sharing options...
ArmandoXS Posted April 18, 2010 Author Share Posted April 18, 2010 well i looked over all the @error(s) i dont think they should collid, but now it says : ==> "Wend" statement with no matching "While" statement.: WEnd which doesnt make any since i have a while statement at the top... Link to comment Share on other sites More sharing options...
JohnOne Posted April 18, 2010 Share Posted April 18, 2010 Ok mate, good luck AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
ArmandoXS Posted April 18, 2010 Author Share Posted April 18, 2010 well i looked over all the @error(s) i dont think they should collid, but now it says : ==> "Wend" statement with no matching "While" statement.:WEndwhich doesnt make any since i have a while statement at the top...nvm its fixed all i gotta do is do al little fixing in the program and ill be done thanks guys Link to comment Share on other sites More sharing options...
JohnOne Posted April 18, 2010 Share Posted April 18, 2010 When I pasted the code into scite, the endif was closing the while. like as though it isnt nested snuggly. Just go right back through it and make sure of your is and endifs, and whiles and while nots. Basically just ticy it up, at the moment it looks like a burst mattress. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
ArmandoXS Posted April 18, 2010 Author Share Posted April 18, 2010 When I pasted the code into scite, the endif was closing the while. like as though it isnt nested snuggly.Just go right back through it and make sure of your is and endifs, and whiles and while nots.Basically just ticy it up, at the moment it looks like a burst mattress.lol wat ever that means i just need to make a few changes b/c the program isnt working exactly how i want it too but the good thing is all the techy bugs are out 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