Loop is not executed if I add one line more

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
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

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
giuseppe
Posts: 40
Joined: Sat Oct 15, 2016 3:30 pm

Loop is not executed if I add one line more

Post by giuseppe » Tue Jun 12, 2018 3:29 am

Hi community, I have a stupid error on my macro but I can not find it... Please, help me.

I have the follow macro, and it run well:
var FirstMacro = "";
FirstMacro = "CODE:";
FirstMacro += "TAB T=1" + "\n";

FirstMacro += "CLEAR\n"
FirstMacro += "URL GOTO=https://m.facebook.com/login/?ref=dbl&fl\n"
FirstMacro += "TAG POS=1 TYPE=INPUT:TEXT FORM=ID:login_form ATTR=ID:m_login_email CONTENT=my@mail.com\n"
FirstMacro += "SET !ENCRYPTION NO\n"
FirstMacro += "TAG POS=1 TYPE=INPUT:PASSWORD FORM=ID:login_form ATTR=NAME:pass CONTENT=mypassword\n"
FirstMacro += "TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:login_form ATTR=NAME:login\n"


var SecondMacro = "";
SecondMacro = "CODE:";
SecondMacro += "TAB T=1" + "\n";
SecondMacro += "SET !ERRORIGNORE YES" + "\n";
SecondMacro += "SET !TIMEOUT_PAGE 10" + "\n";
SecondMacro += "SET !DATASOURCE uidfb.txt" + "\n";
SecondMacro += "SET !DATASOURCE_COLUMNS 1" + "\n";
SecondMacro += "SET !DATASOURCE_LINE {{LOOPNUM}}" + "\n";
SecondMacro += "URL GOTO=https://m.facebook.com/{{!COL1}}" + "\n";

iimPlay(FirstMacro);

for(var i=1; i<4; i++)
{
iimSet("LOOPNUM", i)
iimPlay(SecondMacro);
}
So, if in my file "uidfb.txt" I have for example 3 ID of 3 posts, macro will run well and each of the 3 posts will be visited. Here all is correct :)

But if I add the follow line:
SecondMacro += "TAG POS=1 TYPE=A ATTR=TXT:Like" + "\n";
at the end of "SECONDMACRO", (see the macro at the end of this post in order to understand well where I add this line), when I run the macro only will be visited the first facebook post and will be done like only to the first facebook post, but the others 2 posts will be not visited and of course "like" will not be done...
I am sure it is a stupid error... but I am not informatic and I understand nothing... :/

Are you so kindly to corrige the error?

Following I post the MACRO with the error (it only visite the first facebook post, said in others words macro use only the first ID in the file uidfb.txt).
I hope your reply. Thanks very very very much for your support.
var FirstMacro = "";
FirstMacro = "CODE:";
FirstMacro += "TAB T=1" + "\n";

FirstMacro += "CLEAR\n"
FirstMacro += "URL GOTO=https://m.facebook.com/login/?ref=dbl&fl\n"
FirstMacro += "TAG POS=1 TYPE=INPUT:TEXT FORM=ID:login_form ATTR=ID:m_login_email CONTENT=my@mail.com\n"
FirstMacro += "SET !ENCRYPTION NO\n"
FirstMacro += "TAG POS=1 TYPE=INPUT:PASSWORD FORM=ID:login_form ATTR=NAME:pass CONTENT=mypassword\n"
FirstMacro += "TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:login_form ATTR=NAME:login\n"


var SecondMacro = "";
SecondMacro = "CODE:";
SecondMacro += "TAB T=1" + "\n";
SecondMacro += "SET !ERRORIGNORE YES" + "\n";
SecondMacro += "SET !TIMEOUT_PAGE 10" + "\n";
SecondMacro += "SET !DATASOURCE uidfb.txt" + "\n";
SecondMacro += "SET !DATASOURCE_COLUMNS 1" + "\n";
SecondMacro += "SET !DATASOURCE_LINE {{LOOPNUM}}" + "\n";
SecondMacro += "URL GOTO=https://m.facebook.com/{{!COL1}}" + "\n";
SecondMacro += "TAG POS=1 TYPE=A ATTR=TXT:Like" + "\n";

iimPlay(FirstMacro);

for(var i=1; i<4; i++)
{
iimSet("LOOPNUM", i)
iimPlay(SecondMacro);
}
CIM are:
iMacros Firefox 9.0.3 / Browser Firefox 52.2.1 / Windows 7
CIM are:
iMacros Firefox 9.0.3 / Browser Firefox 52.2.1 / Windows Vista
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Loop is not executed if I add one line more

Post by chivracq » Thu Jun 21, 2018 1:43 am

giuseppe wrote:Hi community, I have a stupid error on my macro but I can not find it... Please, help me.

I have the follow macro, and it run well:

Code: Select all

var FirstMacro = "";
FirstMacro = "CODE:";
FirstMacro += "TAB T=1" + "\n";

FirstMacro += "CLEAR\n"
FirstMacro += "URL GOTO=https://m.facebook.com/login/?ref=dbl&fl\n"
FirstMacro += "TAG POS=1 TYPE=INPUT:TEXT FORM=ID:login_form ATTR=ID:m_login_email CONTENT=my@mail.com\n"
FirstMacro += "SET !ENCRYPTION NO\n"
FirstMacro += "TAG POS=1 TYPE=INPUT:PASSWORD FORM=ID:login_form ATTR=NAME:pass CONTENT=mypassword\n"
FirstMacro += "TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:login_form ATTR=NAME:login\n"


var SecondMacro = "";
SecondMacro = "CODE:";
SecondMacro += "TAB T=1" + "\n";
SecondMacro += "SET !ERRORIGNORE YES" + "\n";
SecondMacro += "SET !TIMEOUT_PAGE 10" + "\n";
SecondMacro += "SET !DATASOURCE uidfb.txt" + "\n";
SecondMacro += "SET !DATASOURCE_COLUMNS 1" + "\n";
SecondMacro += "SET !DATASOURCE_LINE {{LOOPNUM}}" + "\n";
SecondMacro += "URL GOTO=https://m.facebook.com/{{!COL1}}" + "\n";

iimPlay(FirstMacro);

for(var i=1; i<4; i++)
{
iimSet("LOOPNUM", i)
iimPlay(SecondMacro);
}
So, if in my file "uidfb.txt" I have for example 3 ID of 3 posts, macro will run well and each of the 3 posts will be visited. Here all is correct :)

But if I add the follow line:

Code: Select all

SecondMacro += "TAG POS=1 TYPE=A ATTR=TXT:Like" + "\n";
at the end of "SECONDMACRO", (see the macro at the end of this post in order to understand well where I add this line), when I run the macro only will be visited the first facebook post and will be done like only to the first facebook post, but the others 2 posts will be not visited and of course "like" will not be done...
I am sure it is a stupid error... but I am not informatic and I understand nothing... :/

Are you so kindly to corrige the error?

Following I post the MACRO with the error (it only visite the first facebook post, said in others words macro use only the first ID in the file uidfb.txt).
I hope your reply. Thanks very very very much for your support.

Code: Select all

var FirstMacro = "";
FirstMacro = "CODE:";
FirstMacro += "TAB T=1" + "\n";

FirstMacro += "CLEAR\n"
FirstMacro += "URL GOTO=https://m.facebook.com/login/?ref=dbl&fl\n"
FirstMacro += "TAG POS=1 TYPE=INPUT:TEXT FORM=ID:login_form ATTR=ID:m_login_email CONTENT=my@mail.com\n"
FirstMacro += "SET !ENCRYPTION NO\n"
FirstMacro += "TAG POS=1 TYPE=INPUT:PASSWORD FORM=ID:login_form ATTR=NAME:pass CONTENT=mypassword\n"
FirstMacro += "TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:login_form ATTR=NAME:login\n"


var SecondMacro = "";
SecondMacro = "CODE:";
SecondMacro += "TAB T=1" + "\n";
SecondMacro += "SET !ERRORIGNORE YES" + "\n";
SecondMacro += "SET !TIMEOUT_PAGE 10" + "\n";
SecondMacro += "SET !DATASOURCE uidfb.txt" + "\n";
SecondMacro += "SET !DATASOURCE_COLUMNS 1" + "\n";
SecondMacro += "SET !DATASOURCE_LINE {{LOOPNUM}}" + "\n";
SecondMacro += "URL GOTO=https://m.facebook.com/{{!COL1}}" + "\n";
SecondMacro += "TAG POS=1 TYPE=A ATTR=TXT:Like" + "\n";

iimPlay(FirstMacro);

for(var i=1; i<4; i++)
{
iimSet("LOOPNUM", i)
iimPlay(SecondMacro);
}
CIM are:

Code: Select all

iMacros Firefox 9.0.3 / Browser Firefox 52.2.1 / Windows 7
:wink:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Post Reply