brad25 Posted March 5, 2010 Share Posted March 5, 2010 i get this message on my laptop when running my script but not my desktop i was getting it on my desktop but must of fixed it now just on 2 other computers i get this error heres my code anyone no whats up? expandcollapse popupfunc refresh() $scoord = PixelSearch( 2, 2, 1015, 350, 0x378f24) if not @error Then MouseMove ( $scoord[0], $scoord[1]) sleep(1000) MouseClick("left") sleep(7000) EndIf EndFunc func collect() $sscoord = PixelSearch( 114, 225, 932, 500, 0x8fbfd3) if not @error Then MouseMove ( $sscoord[0], $sscoord[1] ) sleep(1000) $ssscoord = PixelSearch( 1, 1, 28, 140, 0x1f91e1) MouseMove ( $ssscoord[0], $ssscoord[1]) MouseClick("left") sleep(8000) endif $ss1coord = PixelSearch( 25, 225, 900, 500, 0x31024f) if not @error Then MouseMove ( $ss1coord[0], $ss1coord[1]) sleep(1000) $sss2coord = PixelSearch( 498, 308, 712, 532, 0xe4b4ab) MouseMove ( $sss2coord[0], $sss2coord[1]) MouseClick("left") sleep(8000) $ssss3coord = PixelSearch( 1, 1, 28, 140, 0x1f91e1) MouseMove ( $ssss3coord[0], $ssss3coord[1]) MouseClick("left") sleep(8000) endif EndFunc while 1 Do refresh() until collect() wend Link to comment Share on other sites More sharing options...
JohnOne Posted March 5, 2010 Share Posted March 5, 2010 (edited) See the way you have this pixelsearch ? $scoord = PixelSearch( 2, 2, 1015, 350, 0x378f24) if not @error Then MouseMove ( $scoord[0], $scoord[1]) sleep(1000) MouseClick("left") sleep(7000) EndIf Well you need the rest of them like that, (error check) because anyone of them without it could give you that error. Edited March 5, 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...
brad25 Posted March 5, 2010 Author Share Posted March 5, 2010 See the way you have this pixelsearch ? $scoord = PixelSearch( 2, 2, 1015, 350, 0x378f24) if not @error Then MouseMove ( $scoord[0], $scoord[1]) sleep(1000) MouseClick("left") sleep(7000) EndIf Well you need the rest of them like that, (error check) because anyone of them without it could give you that error. if i put the error check in each one it doesnt do Refresh() Link to comment Share on other sites More sharing options...
brad25 Posted March 5, 2010 Author Share Posted March 5, 2010 is there another way to check it for errors without using the if statment? Link to comment Share on other sites More sharing options...
omikron48 Posted March 5, 2010 Share Posted March 5, 2010 (edited) The fact that you want to 'check' something means that you'll want to test its value, hence the need to use a conditional statement, i.e. the If...Then..EndIf. Edited March 5, 2010 by omikron48 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