samedi 24 juin 2017

How to use if else statement using imacros and javascript

I want to code iMacros to automatically refresh if it doesn't find the 1st line.

I'm using iMacros v9.0.3 on Firefox 53.0.3 (64 bit) in Windows 8 x64

IF the 1st line exists

iimPlay('CODE:'+'SET !TIMEOUT_STEP 10'+'\nTAG POS=1 TYPE=h2 ATTR=TXT:Welcome CONTENT=EVENT:MOUSEOVER');

THEN run rest of the script

iimPlay('CODE:'+'SET !TIMEOUT_STEP 0'+'\nTAG POS=1 TYPE=a ATTR=class:*&&TXT:LIKE');
iimPlay('CODE:'+'wait seconds=7');
iimPlay('CODE:'+'\nEVENT TYPE=KEYPRESS SELECTOR=* CHAR="1" MODIFIERS="ctrl"');
iimPlay('CODE:'+'\nTAB CLOSEALLOTHERS');
iimPlay('CODE:'+'wait seconds=5');

ELSE

REFRESH

Anyone know how to solve this problem ? Thanks in advance.

Aucun commentaire:

Enregistrer un commentaire