[ASK]script not working after loop.

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

[ASK]script not working after loop.

by sneeki on Wed Sep 21, 2016 10:22 pm

Hi,

so i am building this new script for registering on promo site.
it's basically checking every invitation code i have, and test it with looping statement, but somehow i can't manage to make it work.

Code: Select all
var kick;
kick =  "CODE:";
kick +=  "URL GOTO=http://ikool.online/account/register" + "\n";
kick +=  "TAG POS=1 TYPE=INPUT:TEXT FORM=ID:loginform ATTR=NAME:email CONTENT=email@yahoo.com" + "\n";
kick +=  "SET !ENCRYPTION NO" + "\n";
kick +=  "TAG POS=1 TYPE=INPUT:PASSWORD FORM=ID:loginform ATTR=NAME:password CONTENT=java123" + "\n";
kick +=  "TAG POS=1 TYPE=INPUT:TEXT FORM=ID:loginform ATTR=NAME:invite_code CONTENT=INV-2322-1312022" + "\n";
kick +=  "TAG POS=1 TYPE=BUTTON FORM=ID:loginform ATTR=TXT:Register" + "\n";
kick += "TAG POS=1 TYPE=LI ATTR=TXT:Invitation<SP>error* EXTRACT=TXT" + "\n";

var err2 = "CODE:";
err2 += "SET !DATASOURCE stokk.csv" + "\n";
err2 += "SET !DATASOURCE_COLUMNS 1" + "\n";
err2 += "SET !DATASOURCE_LINE {{!LOOP}}" + "\n";
err2 += "TAG POS=5 TYPE=A ATTR=TXT:«<SP>Back" + "\n";
err2 += "TAG POS=1 TYPE=INPUT:TEXT FORM=ID:loginform ATTR=NAME:invite_code CONTENT={{!COL1}}" + "\n";
err2 += "TAG POS=6 TYPE=INPUT:BUTTON ATTR=*" + "\n";
err2 +=  "Wait seconds=4" + "\n";
err2 += "TAG POS=7 TYPE=INPUT:BUTTON ATTR=*" + "\n";
iimPlay(kick);
var text=iimGetExtract();
var f=text.indexOf("(4:");
var n=text.indexOf("(2:");
var w=text.indexOf("(27:");
   if (n==24){
      iimPlay(err2);
   }
   else if (f==24){
      iimPlay(err2);
   }


the promo site itself giving 2 kinds of error: 1. invitation code is invalid. , 2. invitation code is overuse.
i managed to make it to the 3rd invitation code from datasource, but after multiple method to loop, it is not doing the if condition.

any suggestion on how to make it work ?
Thank You
sneeki
 
Posts: 1
Joined: Wed Sep 21, 2016 8:36 pm

Return to Scripting and Command Line Interface

Who is online

Users browsing this forum: Bing [Bot] and 6 guests

-->