Demo-ImageRecognition

From iMacros
Revision as of 15:08, 26 May 2015 by Shk (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This macro demonstrates the use of the Image Recognition commands to handle interactions on a Flash website.

Macro Code

VERSION BUILD=10.4.28.1074
TAB T=1
TAB CLOSEALLOTHERS
URL GOTO=http://demo.imacros.net/Automate/FlashDemo

REFRESH
'
'MEDIUM replay speed for demo purposes
'SET !REPLAYSPEED MEDIUM
'
SIZE X=720 Y=560
' After setting size to fit the browser window to the Flash applet, we can reduce the 
' search region even more, and so speeding up the search by setting a subregion
' (Please, notice that this is not really required in this example, since the page is rather short.)
SET !REGION_BOTTOM #FOLD#
' Here we have set the bottom boundary as the current browser window fold.
' See http://wiki.imacros.net/!REGION_BOTTOM
IMAGECLICK POS=1 IMAGE=flash8.png CONFIDENCE=90
IMAGECLICK POS=1 IMAGE=flashEnter.png CONFIDENCE=90
IMAGECLICK POS=1 IMAGE=flash1.png CONFIDENCE=90
IMAGECLICK POS=1 IMAGE=flashEnter.png CONFIDENCE=90
IMAGECLICK POS=1 IMAGE=flash+.png CONFIDENCE=90
'
'Test if result is as expected
IMAGESEARCH POS=1 IMAGE=flashResult.png CONFIDENCE=90
'
WAIT SECONDS=2