I want to fill in a form to search.
Some times there may be 0-19 results, it's ok, it works.
But as long as there's a button "next", I'd like to simulate click on it, then save the page as [namefile]-2
, [namefile]-3
, [namefile]-4
and so on.
Any idea how you would do this?
var macroClickNext;
macroClickNext ="CODE:";
//this is just example of button not like your case
macroClickNext +="TAG POS=1 TYPE=BUTTON ATTR=TXT:Next";
var macroTestNext;
macroTestNext ="CODE:";
//this is just example of the button not like in your case
macroTestNext +="TAG POS=1 TYPE=BUTTON ATTR=TXT:Next CONTENT=EVENT:MOUSEOVER";
var test=false;
while(true)
{
test=iimPlay(macroTestNext)
if (test>0)
{
iimPlay(macroNext)
}
else
{
break;
}
}
In your example this would do the job. It will click the Next button as long as it's on the page. CONTENT:EVENT:MOUSEOVER
is a simple event that hovers over a page element. If it's present it will return true , if not it will return false.