1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

iMacros and Javascript

Discussion in 'General Scripting Chat' started by TaAaZZ28, May 26, 2016.

  1. TaAaZZ28

    TaAaZZ28 Junior Member

    Joined:
    Aug 31, 2014
    Messages:
    133
    Likes Received:
    37
    Gender:
    Male
    I am currently making a bot using iMacros, I want to stop the iMacros scripts to stop if a certain text appears. Currently I have list of 7 scripts (.iim) which need to be played in series. I am using iimPlay() to do that.

    If while playing script 1 text, "Email address already in use", shows up then it should terminate and restart the whole process.

    Basically I want that when I am playing scripts in order, while script 1 is playing, if text appears then the whole process should restart. I tried:
    Code:
     
      setInterval(function() {
          if ( document.body.innerHTML.indexOf("Account already exists") >= 0 ) {
            playMacros();
          }
        }, 5000);
    
    but it says setInterval doesn't exist. I also tried doing window.setInterval, same results. Also, by just doing iimPlay one after another in JS file, nothing happens on clicking the play button.

    Thanks
     
  2. TaAaZZ28

    TaAaZZ28 Junior Member

    Joined:
    Aug 31, 2014
    Messages:
    133
    Likes Received:
    37
    Gender:
    Male
    Since I didn't need the email for verification, I added a random string infront of the email to solve the problem.