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

iMacros Timeout error problem

Discussion in 'Black Hat SEO' started by allinSSD, Nov 13, 2014.

  1. allinSSD

    allinSSD Newbie

    Joined:
    Feb 10, 2014
    Messages:
    27
    Likes Received:
    1
    Was wondering how to get iMacros to reload the page when it times out and stops from not detecting an element that didn't load?

    Sometimes I have to reload the page 5 or more times manually, then the element that it's searching for will appear then I can continue iMacros from there but I have to do it manually.

    Any way to have it reload the page every time the timeout error occors?
     
  2. allinSSD

    allinSSD Newbie

    Joined:
    Feb 10, 2014
    Messages:
    27
    Likes Received:
    1
    timeout error script stops. if i use ignore error the script can't keep running because it can't click the element it needs to. it needs to keep reloading till that element appears.
     
  3. HoNeYBiRD

    HoNeYBiRD Jr. VIP Jr. VIP

    Joined:
    May 1, 2009
    Messages:
    5,881
    Likes Received:
    7,122
    Gender:
    Male
    Occupation:
    Geographer, Tourism Manager
    Location:
    Ghosted
    not sure how time sensitive what you're doing, but if everything else fails, you can copy that part of the code where you experience the issue below each other 5+ times, you can set the replay speed to fast and the tag timeout to a lower number to speed up the macro and don't forget to set error ignore to yes

    i'm not a programmer, so i'm not good w/ javascript, but maybe it can be done with the if else command somehow
    if element not found do this (refresh the page), if element found do that

    edit: wait, i realized what i wrote above in the first paragraph is no good, because you don't know when the element loads exactly (let's say you copy-pasted the part of the code in question 10 times below each other, element appears with 8th replay, but the macro continues to the other part of the code only after the 10th replay when the element possibly doesn't appear)

    you would need to replay/copy the whole code, but if it's a long code, ain't nobody got time fo dat :)
    in that case, your only hope is javascript imho, if you want to do this w/ imacros
    you can try searching for tips on stackoverflow or simply on google, you may find something which can be used in cases like this
     
    Last edited: Nov 13, 2014
  4. ibins

    ibins Junior Member

    Joined:
    May 9, 2011
    Messages:
    176
    Likes Received:
    39
    Location:
    really world wide
    save as javascript file

    demo.js

    Code:
    var load;
    var onz;
    
    
    load  =  "CODE:";
    load +=  "CLEAR\n"; 
    load +=  "SET !EXTRACT NULL\n"; 
    load +=  "URL GOTO=http://localhost/rand\n";
    load +=  "TAG POS=1 TYPE=DIV ATTR=ID:nr EXTRACT=TXT\n"; 
    
    
    while (onz != 2)
    {
    iimPlay(load)
    onz=iimGetLastExtract(0);
    }
    
    
    alert ("ok!");
    
    in this code localhost/rand is simply a random php number generator.
    When imacros extracts from div with id:nr the number 2,
    it exists. This way you can check if element exists, otherwise reload.
    Important: The TAG command to check for must always be at last line.