How to get the frame in imacros

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information:CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
bilgamyompi
Posts: 30
Joined: Mon Feb 12, 2018 7:03 pm

How to get the frame in imacros

Post by bilgamyompi » Wed Jun 27, 2018 12:11 am

I just try to get the frame but using loop not works.

Code: Select all

SET !LOOP 8
FRAME F = {{!LOOP}}
TAG POS=1 TYPE=A ATTR=TXT:HERE
I tried with javascript but i dont know how to deal with implay and the same time use a loop for getting the frame
bilgamyompi
Posts: 30
Joined: Mon Feb 12, 2018 7:03 pm

Re: How to get the frame in imacros

Post by bilgamyompi » Wed Jun 27, 2018 12:52 am

Tried in javascript but never catch the frame!

Code: Select all

var frame=SearchFrame();
iimSet("frame",frame)

var macra; 
macra =  "CODE:";
macra +=  "WAIT SECONDS=4" + "\n";
macra +=  "TAG POS=1 TYPE=DIV ATTR=TXT:Confirmacion" + "\n";
macra +=  "WAIT SECONDS=4" + "\n";
macra +=  "FRAME F=frame" + "\n";
macra +=  "TAG POS=1 TYPE=A ATTR=TXT:Click<SP>aqui<SP>para<SP>confirmar<SP>el<SP>correo EXTRACT=HREF" + "\n";
macra +=  "TAB OPEN" + "\n";
macra +=  "WAIT SECONDS=1" + "\n";
macra +=  "TAB T=3" + "\n";
macra +=  "URL GOTO={{!EXTRACT}}" + "\n";
macra +=  "WAIT SECONDS=2" + "\n";
macra +=  "TAB CLOSE" + "\n";
iimPlay(macra)


function SearchFrame()
{

var macroFindFrame;
macroFindFrame =  "CODE:";
macroFindFrame +=  "TAB T=1" + "\n"; 
macroFindFrame +=  "FRAME F = {{i}}" + "\n";
macroFindFrame +=  "TAG POS=1 TYPE=A ATTR=TXT:Click<SP>aqui<SP>para<SP>confirmar<SP>el<SP>correo EXTRACT=HREF" + "\n";

var frame=0;

for(i=1;i<=7;i++){
iimSet("i",i)

//if the result of the macro is true save frame number and break
if(iimPlay(macroFindFrame)==true)
{

frame=i;

break;
}
}
//return frame number
return frame;


}


var other =  "CODE:";
other +=  "TAB CLOSEALLOTHERS" + "\n";
iimPlay(other)
chivracq
Posts: 8143
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: How to get the frame in imacros

Post by chivracq » Wed Jun 27, 2018 1:50 am

bilgamyompi wrote:I just try to get the frame but using loop not works.

Code: Select all

SET !LOOP 8
FRAME F = {{!LOOP}}
TAG POS=1 TYPE=A ATTR=TXT:HERE
I tried with javascript but i dont know how to deal with implay and the same time use a loop for getting the frame
bilgamyompi wrote:Tried in javascript but never catch the frame!

Code: Select all

var frame=SearchFrame();
iimSet("frame",frame)

var macra; 
macra =  "CODE:";
macra +=  "WAIT SECONDS=4" + "\n";
macra +=  "TAG POS=1 TYPE=DIV ATTR=TXT:Confirmacion" + "\n";
macra +=  "WAIT SECONDS=4" + "\n";
macra +=  "FRAME F=frame" + "\n";
macra +=  "TAG POS=1 TYPE=A ATTR=TXT:Click<SP>aqui<SP>para<SP>confirmar<SP>el<SP>correo EXTRACT=HREF" + "\n";
macra +=  "TAB OPEN" + "\n";
macra +=  "WAIT SECONDS=1" + "\n";
macra +=  "TAB T=3" + "\n";
macra +=  "URL GOTO={{!EXTRACT}}" + "\n";
macra +=  "WAIT SECONDS=2" + "\n";
macra +=  "TAB CLOSE" + "\n";
iimPlay(macra)


function SearchFrame()
{

var macroFindFrame;
macroFindFrame =  "CODE:";
macroFindFrame +=  "TAB T=1" + "\n"; 
macroFindFrame +=  "FRAME F = {{i}}" + "\n";
macroFindFrame +=  "TAG POS=1 TYPE=A ATTR=TXT:Click<SP>aqui<SP>para<SP>confirmar<SP>el<SP>correo EXTRACT=HREF" + "\n";

var frame=0;

for(i=1;i<=7;i++){
iimSet("i",i)

//if the result of the macro is true save frame number and break
if(iimPlay(macroFindFrame)==true)
{

frame=i;

break;
}
}
//return frame number
return frame;


}


var other =  "CODE:";
other +=  "TAB CLOSEALLOTHERS" + "\n";
iimPlay(other)
:wink:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
thecoder2012
Posts: 248
Joined: Sat Aug 15, 2015 5:14 pm
Location: Internet
Contact:

Re: How to get the frame in imacros

Post by thecoder2012 » Fri Nov 02, 2018 9:20 pm

bilgamyompi wrote:Tried in javascript but never catch the frame!
Okay but your example has no url or html code for tests.
Join 9kw.eu Captcha Service now and let your iMacros continue downloads and scripts while you sleep. - Custom iMacros? Contact me!
chivracq
Posts: 8143
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: How to get the frame in imacros

Post by chivracq » Sat Nov 03, 2018 6:35 am

thecoder2012 wrote:
bilgamyompi wrote:Tried in javascript but never catch the frame!
Okay but your example has no url or html code for tests.
Pfff, yeah exactly what I meant with my " :wink: ", User joined in Feb 2018, hum 8 months ago now [Novb 2018], 30x Posts and started many Threads, I must have given some Explanation about my " :wink: " in their/some previous Thread already..., and why I didn't or stopped answer(ing) their Post/Thread(s)... :idea:

My last Reply was already from June 2018, more than 4 months ago...!, @OP didn't bother to react anymore, no need to "wake them up", I would think, sssshhhhhhuuuussshhh...., ah-ah...! :shock: ...!,
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
thecoder2012
Posts: 248
Joined: Sat Aug 15, 2015 5:14 pm
Location: Internet
Contact:

Re: How to get the frame in imacros

Post by thecoder2012 » Sat Nov 03, 2018 8:59 pm

chivracq wrote:Pfff, yeah exactly what I meant with my " :wink: ", User joined in Feb 2018, hum 8 months ago now [Novb 2018], 30x Posts and started many Threads, I must have given some Explanation about my " :wink: " in their/some previous Thread already..., and why I didn't or stopped answer(ing) their Post/Thread(s)... :idea:
Thanks for your explanation! :|
Join 9kw.eu Captcha Service now and let your iMacros continue downloads and scripts while you sleep. - Custom iMacros? Contact me!
chivracq
Posts: 8143
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: How to get the frame in imacros

Post by chivracq » Sun Nov 04, 2018 7:58 am

thecoder2012 wrote:
chivracq wrote:Pfff, yeah exactly what I meant with my " :wink: ", User joined in Feb 2018, hum 8 months ago now [Novb 2018], 30x Posts and started many Threads, I must have given some Explanation about my " :wink: " in their/some previous Thread already..., and why I didn't or stopped answer(ing) their Post/Thread(s)... :idea:
Thanks for your explanation! :|
Yeah, you know me..., I usually get a bit fed up after asking 2 or 3 times for FCI and if User doesn't follow up and doesn't share their Sol after helping them 1-2-3 times... :wink:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
Post Reply