Jump to content

while loop stops


Recommended Posts

hello, I am currently busy with a script but I am stuck and asking you for help.

When I get a popup I want to press enter and Send my nickname and I am using this code for this, but it doesnt seem to work. For some reason it stops IN the While loop.

$CHECK1 = PixelGetColor( 272, 373)
$CHECK2 = PixelGetColor( 345, 373)
$CHECK3 = PixelGetColor( 737, 377)
$CHECK4 = PixelGetColor( 588, 400)

WinWaitActive("Enter your username :)")

While Not ($CHECK1 = 0 AND $CHECK2 = 0 AND $CHECK3 = 0 AND $CHECK4 = 13947080)
  MouseClick("left", 586, 398, 0)
  Send("{SHIFTDOWN}{HOME}{SHIFTUP}apsync{ENTER}")
  Sleep(2300)
  $CHECK1 = PixelGetColor( 272, 373)
  $CHECK2 = PixelGetColor( 345, 373)
  $CHECK3 = PixelGetColor( 737, 377)
  $CHECK4 = PixelGetColor( 588, 400)
Wend

MsgBox(0, "", "this should not be reached...");this GETS reached :(
Link to comment
Share on other sites

hmm these are good, any better methods for checking? i was thinking of WinWaitActive("title name") but the title can be different, is there a way to do

WinWaitActive("TITLE1" OR "TITLE2") ;it should activate when current window title is "TITLE1", or "TITLE2"

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...