how do i put a condition into the imacro script

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
gizmoconcept
Posts: 2
Joined: Wed May 13, 2009 9:45 pm

how do i put a condition into the imacro script

Post by gizmoconcept » Wed May 13, 2009 10:02 pm

Situation:
I want to scan a webpage and look out for a "keyword" to appear. If the "keyword" appears i will do nothing but just let the script continue running to the following line. However, if the "keyword" does NOT appear(the condition is not met) i want to retrace a couple(say 5 lines) of lines of script and run the script again.

10 script starts....
20
30
40 check for kw existence on page
50 if found - goto 70
else goto 60
60 goto 10
70 script continues....

Pardon my english. I hope I explained it clearly enough for someone to be able to help me. Gracias
Ravendey
Posts: 15
Joined: Tue Apr 08, 2008 5:05 pm

Re: how do i put a condition into the imacro script

Post by Ravendey » Thu May 14, 2009 2:51 am

Search the forum/site for IF/THEN. Many people asked for that.

The answer in short: imacros can't do if/then. You'll need to use the "scripting interface".
gizmoconcept
Posts: 2
Joined: Wed May 13, 2009 9:45 pm

Re: how do i put a condition into the imacro script

Post by gizmoconcept » Thu May 14, 2009 6:22 am

thanks for your reply, much appreciated.

Does that mean I need the scripting version of iMacros? Is it possible to do it with the opensource version?
Marcia, Tech Support
Posts: 1095
Joined: Thu Jan 29, 2009 1:10 pm

Re: how do i put a condition into the imacro script

Post by Marcia, Tech Support » Thu May 14, 2009 6:49 am

Hello,

The freeware iMacros Addon for Firefox has a built in javascript scripting interface. So, either you need the Scripting Edition and you can write your script in any Windows programing language and use any of the three browsers, or you write your script in javascript and use Firefox.
Regards,

Marcia
Post Reply