Need Help Script Inside! Just wont Execute Correctly

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.

Need Help Script Inside! Just wont Execute Correctly

by ChapoGuzman on Fri Aug 23, 2013 10:30 pm

OKay first off I had the perfect script, but their was no way to run a else conditions so had to parlay everything in the javascript somewhat but now the scripts runs but not as intended.

Code: Select all
const iterations = 100; // Number of times to loop

for (var i=0; i<iterations; i++){
   iimSet('iteration', i );
   iimPlay('Step1'); // PART ONE, Grabs the varibles and sets everything up.
   
   
var string = "Error, Invalid Request.";
var result = string.match(/error/i);
// result == 'ERROR';

if (result){
   iimPlay(Step1'); // PART TWO Checks to see if it was successful if not then Loop back to Step One but if it was Goes on to Step 3
}   


 
else {
    iimPlay('Step2');}}  // PART THREE, this is the last step and save all extracts.



Everything triggers but does not execute like it should. For Example. On "PART ONE" we call an iim Step1 where we set our varibles etc (where everything worked before javascript) and it runs like it should perfectly. The problem comes to play on "STEP TWO, no matter if it detects that string or not it will still fireoff and re-LOOP which it shouldent.

PART THREE when I manipulate the script to make it to PART THREE to test it, when it complete it LOOPS but does not update the {{COLS}} or the !VAR1 like it should, even thought everything is fine.

Anyhelp please, I was too proud to beg at first but its been about a few days over that obbessed point and I just need help, Cant figure it out on my own.
ChapoGuzman
 
Posts: 2
Joined: Fri Aug 23, 2013 7:58 pm

Return to Scripting and Command Line Interface

Who is online

Users browsing this forum: No registered users and 3 guests

-->