Page 1 of 1

Loop is not executed if I add one line more

Posted: Tue Jun 12, 2018 3:29 am
by giuseppe
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

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

Posted: Thu Jun 21, 2018 1:43 am
by chivracq
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: