Confirm screenimage

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
ca10c3sar
Newbie
Posts: 16
Joined: Thu Apr 13, 2017 7:36 pm

Confirm screenimage

Post by ca10c3sar » Thu Apr 13, 2017 7:40 pm

How can i set a true or false when timeout of Wait Screen Image expires?

WaitScreenImage>%BMP_DIR%\image_1.bmp,0.7,CCOEFF

Like if>waitscreenimage>false then golabel start

Im trying do a macro to auto login in one game but sometimes it fails, because internet, lag, etc, so when it fail i need to make it start again, i'm using waitscreenimage at the end, to confirm if it succeeded to login into the game.

Code: Select all

//Recorded Events
Let>WW_TIMEOUT=5
Label>Start
MouseMove>249,859
Wait>0.787
//Clicking on: 
//SnapShotFile>%BMP_DIR%snapshot_0.png
Wait>0.001
LClick
Wait>0.126
//Activating Window: 
//SnapShotFile>%BMP_DIR%snapshot_1.png
WaitWindowOpen>PXG Client
MoveWindow>PXG Client,-4,-4
ResizeWindow>PXG Client,1924,845
Wait>0.125
MouseMove>371,722
Wait>2.236
Press Enter
Let>WSI_TIMEOUT=5
//Wait for 
WaitScreenImage>%BMP_DIR%\image_1.bmp,0.7,CCOEFF
If>WSI_TIMEOUT=TRUE
Goto>Start
Else
Goto>End
Label>End

hagchr
Automation Wizard
Posts: 327
Joined: Mon Jul 05, 2010 7:53 am
Location: Stockholm, Sweden

Re: Confirm screenimage

Post by hagchr » Fri Apr 14, 2017 6:29 am

In the help section it seems that if you use WSI_TIMEOUT then the variable to check for TRUE/FALSE is WSI_TIMEDOUT (with D).

User avatar
CyberCitizen
Automation Wizard
Posts: 721
Joined: Sun Jun 20, 2004 7:06 am
Location: Adelaide, South Australia

Re: Confirm screenimage

Post by CyberCitizen » Mon Apr 17, 2017 3:04 am

Let>WSI_TIMEOUT=15

If>WSI_TIMEDOUT=TRUE
MDL>Screen Imaged Timed Out
EndIf

If>WSI_TIMEDOUT=FALSE
MDL>Screen Appeared Continue With Script Etc
EndIf
FIREFIGHTER

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