Jump to content
Sign in to follow this  
n00bscripter

While ... WEnd Problem

Recommended Posts

I'm new to auto it scripting and I have problem

I get this error

line 26 (File "..."):

WEnd

Error: "Wend" statement with no matching "While" statement.

this is the script

CODE
sleep(3000)

$s = 1

While $s < 10

if PixelGetColor(90,70) = 0000A1 then

if PixelGetColor(238,70) = D86165 then

sleep(3000)

Send("1")

sleep(3000)

Send("2")

sleep(3000)

Send("3")

sleep(3000)

Send("4")

sleep(3000)

Send("5")

else

sleep(3000)

send("0")

sleep(3000)

else

sleep(3000)

send("p")

$s = $s * 1

WEnd

plz help

Share this post


Link to post
Share on other sites

if PixelGetColor(90,70) = 0000A1 thenoÝ÷ ÚÈhºW[y«­¢+Ù¥A¥á±Ñ
½±½È äÀ°ÜÀ¤ôÁàÀÀÀÁÄÑ¡
same with the other If-statement.

The other problem is actually not related to the While/WEnd-loop, but instead it's because you're

missing two EndIf to close your If's. So I'm guessing that you want to place those two EndIf's at

the line before where you increase $s. Btw, you might want to check out a For/Next-loop where

you then wont have to manually increase $s.

Share this post


Link to post
Share on other sites

ok, I changed script and I get no error, but script doing nothing :/

here is changed one

CODE
sleep(3000)

$s = 1

While $s < 100

If PixelGetColor(90,70) = 10551296 then

If PixelGetColor(238,70) = 6644184 then

sleep(3000)

Send("1")

sleep(3000)

Send("2")

sleep(3000)

Send("3")

sleep(3000)

Send("4")

sleep(3000)

Send("5")

else

sleep(3000)

send("0")

sleep(3000)

EndIf

else

sleep(3000)

send("p")

EndIf

$s = $s + 1

WEnd

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...