Simple loop fails to exit

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
buckw1
Junior Coder
Posts: 20
Joined: Sun Sep 18, 2005 5:08 am

Simple loop fails to exit

Post by buckw1 » Sun Sep 03, 2006 11:10 pm

Hi,
Here is my simple loop, just waiting on app to go full screen then I continue. What am I doing wrong?

This damn thing will not let me post a log without merging with code sample!
Log in next post!

Label>WaitForWindow
GAW>window_title,X,Y,XWidth,YHeight
wait>1
If>%XWidth%1024 AND %YHeight%768,WaitForWindow

buckw1
Junior Coder
Posts: 20
Joined: Sun Sep 18, 2005 5:08 am

Post by buckw1 » Sun Sep 03, 2006 11:28 pm

Log: and the log typo is result of this darn forum

Code: Select all

9/3/2006 17:51:21:584 - START: If>720<>1024 AND 460<768>WaitForWindow
9/3/2006 17:51:21:631 - START: GAW>window_title,X,Y,XWidth,YHeight
9/3/2006 17:51:25:482 -   END: GAW>window_title,X,Y,XWidth,YHeight
9/3/2006 17:51:25:576 - START: wait>1
9/3/2006 17:51:26:578 -   END: wait>1
9/3/2006 17:51:26:578 - START: If>1024<>1024 AND 768<768>WaitForWindow
9/3/2006 17:51:26:593 - START: GAW>window_title,X,Y,XWidth,YHeight
9/3/2006 17:51:26:593 -   END: GAW>window_title,X,Y,XWidth,YHeight
9/3/2006 17:51:26:593 - START: wait>1
9/3/2006 17:51:27:611 -   END: wait>1
9/3/2006 17:51:27:611 - START: If>1024<>1024 AND 768<>768,WaitForWindow

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Mon Sep 04, 2006 12:04 am

Need to modify the IF line to handle complex expression.

Change from this:

Code: Select all

If>%XWidth%<>1024 AND %YHeight%<>768,WaitForWindow
Change to this:

Code: Select all

IF>{(%XWidth%<>1024 ) AND (%YHeight%<>768)}
     WaitForWindow
ELSE
    //do something else
ENDIF
===============================
Forum hint:
When posting code with symbols, try putting a checkmark in the box to Disable HTML in this post.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

buckw1
Junior Coder
Posts: 20
Joined: Sun Sep 18, 2005 5:08 am

Post by buckw1 » Mon Sep 04, 2006 1:20 am

You solved both issues, thank you!

Buck

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts