tachon1 Posted August 7, 2008 Share Posted August 7, 2008 While 1 = 1 Sleep(5000) $coor = PixelSearch(6, 62, 1128, 803, 0x16777215, 2, 2) While @error = 0 While 1 = 1 $i = 0 While $i <5 Sleep(2000) send("{a}") $I = $I + 1 Wend End $coor = PixelSearch(6, 62, , 1128, 803, 0x16777215, 2, 2) Wend Getting this error. Line 14 End End^ERROR Error: Missing seperator character after keyword. If i remove it I get line 17 Wend Error: "While" Statement has no matching "wend" Statement how do i fix this. Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted August 7, 2008 Share Posted August 7, 2008 (edited) There's is no function called END, and you are missing two WEnd. Edited August 7, 2008 by AdmiralAlkex .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...
killerofsix Posted August 7, 2008 Share Posted August 7, 2008 you have 4 while loops so u need 4 wend statements, u only had 2 . i believe what you meant to write was this: While 1 = 1 Sleep(5000) $coor = PixelSearch(6, 62, 1128, 803, 0x16777215, 2, 2) ;I get a syntax error here but it runs fine While @error = 0 While 1 = 1 $i = 0 While $i < 5 Sleep(2000) Send("{a}") $i = $i + 1 WEnd WEnd ;You wrote 'End' here $coor = PixelSearch(6, 62,, 1128, 803, 0x16777215, 2, 2) WEnd WEnd ;I added this it helps if you organize your script like above. Press CTRL+T in Scite to organize your script "The quieter you are, the more you are able to hear..." My AppsUSB Finder Link to comment Share on other sites More sharing options...
tachon1 Posted August 7, 2008 Author Share Posted August 7, 2008 There's is no function called END, and you are missing two WEnd.Where do input them ? Link to comment Share on other sites More sharing options...
tachon1 Posted August 7, 2008 Author Share Posted August 7, 2008 Ok that fixed it sorry havent used auto in years What I am trying to do is get it so teh program locates a color that pops up and begins to run a script then if teh color goes away it stops and serches for the color again until it pops up again then it runs the script again am I headed the right way ? Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted August 7, 2008 Share Posted August 7, 2008 If I had to guess, it would look like this: While 1 Sleep(5000) PixelSearch(6, 62, 1128, 803, 16777215, 2, 2) If @error Then ContinueLoop For $x = 0 To 4 Sleep(2000) Send("{a}") Next Wend .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...
tachon1 Posted August 7, 2008 Author Share Posted August 7, 2008 If I had to guess, it would look like this: While 1 Sleep(5000) PixelSearch(6, 62, 1128, 803, 16777215, 2, 2) If @error Then ContinueLoop For $x = 0 To 4 Sleep(2000) Send("{a}") Next Wend I will add that in and see if it fixs my problem 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