Sign in to follow this  
Followers 0
apsync

while loop stops

4 posts in this topic

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 :(

Share this post


Link to post
Share on other sites



If the while loop is exiting, that tells me one of the conditions of staying in the while is not being met.

check your check values.


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
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"

Share this post


Link to post
Share on other sites

Check is coodinates are absolute or windows related.

About the possibility of two titles just use:

WinWaitActive("TITLE1") OR WinWaitActive("TITLE2")

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  
Followers 0