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

iMacro Error Ignore

Discussion in 'Scripting' started by latspread, May 17, 2017.

  1. latspread

    latspread Newbie

    Joined:
    Apr 10, 2014
    Messages:
    1
    Likes Received:
    0
    I have been searching far and wide throughout google to no avail. I am really hungry for some wisdom and guidance as I am new to this! :)

    MY IMACRO CODE

    SET !ERRORIGNORE YES

    URL GOTO=https: (URL LINK GOES HERE)

    TAG POS=1 TYPE=* ATTR=TXT:1NEW CONTENT=EVENT:FAIL_IF_FOUND

    SET !ERRORIGNORE NO

    SET !TIMEOUT_STEP 10

    'Or more simply put:

    URL GOTO=https: (URL LINK GOES HERE)

    TAG POS=1 TYPE=* ATTR=TXT:1NEW CONTENT=EVENT:FAIL_IF_FOUND

    OPERATING SYSTEM

    Running this on the latest firefox with the latest iMacro (.iim) - Trouble shooting on windows 7 (SP 2) and also Mac Book Pro (Yosemite 10.1.1)

    CONTEXT

    I have a script that is automating tasks - But people can see my activity. When people message me I want my script to see a new message then abort the script with an error FAIL_IF_FOUND.

    PROBLEM

    The problem here is that SET !ERRORIGNORE YES cancels out my FAIL_IF_FOUND command.

    TROUBLE SHOOTING

    I have tried so many variations with !ERRORIGNORE YES and !ERRORIGNORE NO placing them all in different positions but regardless if a message comes in or not the !ERRORIGNORE YES continues the loop and ignores FAIL_IF_FOUND...

    Ironically if I remove !ERRORIGNORE YES then begin loop it stops if a message comes, BUT if there is no message the error "element * specified by TXT:1NEW was not found, line: 2 (Error code: -921)" occurs...

    I cannot seem to get it to loop even though the element/value is not present. I also am not too familiar with Java script as well.

    POSSIBLE SOLUTION

    My solution (unless you have a better one) would be to make a condition using the EVAL command.

    The condition being, if "1 New" value is seen, then Abort Macro with Error.

    QUESTION

    Would someone here have a possible solution for the EVAL code and I am not too familiar with this - how would the code look?

    Kindly thank you for reading and thank you in advance for attempting to answer!! :)

    Cheers,
     
  2. LostLife

    LostLife Regular Member

    Joined:
    May 12, 2017
    Messages:
    258
    Likes Received:
    283
    Gender:
    Male
    Occupation:
    Software Engineer
    You should use JS with imicros. It will be easier to condition with Imacros instead of using imicros condition.