WaitScreenImage>BitmapFile[,Tolerance[,MatchAlgorithm]]

 

Not supported in Macro Scheduler Lite.

 

Waits until the image in BitmapFile is found on the screen.

 

It is recommended to use the Image Recognition Wizard to create WaitScreenImage code.

 

Returns the number of occurrences found on the screen in the WSI_RESULT variable.

 

For an explanation of Tolerance and MatchAlgorithm please see FindImagePos.  WaitScreenImage is effectively a wrapper for a loop containing FindImagePos.

 

The system variable WSI_TIMEOUT can be used to set the number of seconds after which this command should timeout.  If set to zero (the default) the timeout will not occur and the command will continue indefinitely.  If WSI_TIMEOUT is used, WSI_TIMEDOUT will indicate whether or not the command ended successfully.  If it timed out WSI_TIMEDOUT will be set to TRUE otherwise, if the image was found within the time out period it will be set to FALSE.  If the command times out WSI_BITMAP will contain the path of BitmapFile. This is useful if using a global event handler for WSI_TIMEDOUT and you nee to know which WaitScreenImage timed out.

 

 

Abbreviation: WSI

See also: CompareBitmaps, FindImagePos, ScreenCapture, GetScreenRes

 

Example

 

WaitScreenImage>d:\today_button.bmp
MessageModal>FoundIt