var jsLF='\n';
var macro;
var page;
do{
page=1;
init(1);
macro +="TAB T=1"+jsLF;
macro +="URL GOTO=http://likersvilla.com/website.php";
iimPlay(macro);
do{
init(1);
macro +="TAB T=1"+jsLF;
macro +="TAG POS="+page+" TYPE=INPUT:BUTTON ATTR=* EXTRACT=TXT";
iimPlay(macro);
var a=iimGetLastExtract(1);
if(a=="#EANF#")
break;
init(1);
macro +="TAB T=1"+jsLF;
macro +="TAG POS="+page+" TYPE=INPUT:BUTTON ATTR=*"+jsLF;
macro +="TAB T=2"+jsLF;
macro +="TAB T=1"+jsLF;
macro +="WAIT SECONDS=30";
iimPlay(macro);
var b;
do{
init(1);
macro +="ONDIALOG POS=1 BUTTON=OK CONTENT=" +jsLF;
macro +="WAIT SECONDS=1"+jsLF;
macro +="TAG POS=1 TYPE=FONT ATTR=TXT:*Points<SP>added<SP>to<SP>your* EXTRACT=TXT";
iimPlay(macro);
b=iimGetLastExtract(1);
}while(b=="#EANF#");
page++;
}while(1);
}while(1);
function init(time_step,timeout_page){
timeout_page=timeout_page?timeout_page:60;
//ham khoi tao macro
macro ="CODE:";
macro += "SET !ERRORIGNORE YES" + jsLF;
macro += "SET !EXTRACT_TEST_POPUP NO" + jsLF;
macro += "SET !ERRORCONTINUE YES" + jsLF;
macro += "SET !TIMEOUT_PAGE "+timeout_page + "" + jsLF;//load page max 60s
macro += "SET !TIMEOUT_STEP "+time_step + "" + jsLF;//delay once step
macro +="ONDIALOG POS=1 BUTTON=OK CONTENT=" + jsLF;
}