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

Imacros help!

Discussion in 'General Programming Chat' started by ZeroBladeStaten, Dec 11, 2013.

  1. ZeroBladeStaten

    ZeroBladeStaten Newbie

    Joined:
    Dec 16, 2009
    Messages:
    5
    Likes Received:
    0
    So I'm trying to add an if/else conditional statement in my .js file in imacros.
    What I'm trying to accomplish is if it finds the word "In Battle!" anywhere on the page to run a certain macro.

    This is what I have now,

    Code:
    iimPlay("CODE:TAB T=1\nURL GOTO=InsertLinkhere\nTAG POS=1 TYPE=A ATTR=TXT:In<SP>battle!* EXTRACT=TXT");
    var G_Extract=iimGetLastExtract(1);
    if (G_Extract=="In<SP>Battle!*")
    {
    iimPlay ("Battle.iim")
    }
    else
      {
      iimPlay ("Continue.iim")
      }
    Any help would be appreciated!
    If you got questions or need me to further explain, Let me know!