Aug 28 2009 :: by Alex Yumashev
Another example of "triggering" events with our Macro Recorder software using its "IF" statement. Below is a macro-script that makes Macro Recorder wait until a pixel at the given coordinates becomes white. Since Macro Recorder does not have a "wait for pixel" command, we have to use the IF statement:

LABEL : start
IF PIXEL COLOR EQUALS : 351 : 535 : 16777215
GOTO : end
DELAY : 2000
GOTO : start
LABEL : end
MESSAGE BOX : Woohoo, the pixel is white. Exiting...

This macro checks every 2 seconds, and if the pixel at the coordinates "351:535" becomes white, the macro exits. Simply save the above text as a plain-text file with a ".mcr" extension and load it into the Macro Recorder to test how it works (or simply select and copy-paste the text above straight into the Macro Recorder).

'Macro Recorder: another trigger example - wait for pixel' was written by Alex Yumashev
Alex Yumashev
Alex has founded Jitbit in 2005 and is a software engineer passionate about customer support. Alex holds a degree in computer science is a Microsoft Certified Solution Developer

Subscribe comments