If and else statement help!

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

If and else statement help!

by n00bGT on Tue Dec 10, 2013 4:38 pm

So I'm trying to add an if/else conditional statement in my .js file
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: Select all
iimPlay("CODE:TAB T=1\nURL GOTO=www.InsertLinkhere.com\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 ("Fail.iim")
  }


Any help would be appreciated!
If you got questions or need me to further explain, Let me know!
n00bGT
 
Posts: 3
Joined: Sun Dec 20, 2009 9:51 am

Return to General Support & Discussions

Who is online

Users browsing this forum: No registered users and 4 guests

-->