Macro Scheduler 15




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 optional arguments x and y can be used to specify return variables which will store the position of the image found. This is useful as it means as well as waiting for a screen image you can interract with it without using a subsequent FindImagePos call. See FindImagePos for details of these return variables.


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





//with position returned