really simple if, then help

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.
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
ddskary
Posts: 2
Joined: Thu Feb 03, 2011 2:27 pm

really simple if, then help

Post by ddskary » Thu Feb 03, 2011 2:46 pm

so the makers of my favorite game have been making edits to the game that now cause my browser to get redirected to a page that does not exist and i keep getting a 404. currently i have a macros that waits 240 seconds and then goes back to the correct web page. i want to make an IF THEN statement that will check the current URL and if it resembles the one i don't want it should go to the correct one, but i can't get the syntax right.

current:

Code: Select all

SET !ERRORIGNORE YES
WAIT SECONDS=240
URL GOTO=http://CORRECTsite.com
i used the set !errorignore yes because every time the correct page loads there is something that was causing the script to stop running

need something like:

Code: Select all

SET !ERRORIGNORE YES
IF URL=http://www.INCORRECTsite.com THEN
URL GOTO=http://correctSITE.com
END IF
any help will be greatly appreciated
Claudiu
Posts: 32
Joined: Fri Aug 07, 2009 10:16 am

Re: really simple if, then help

Post by Claudiu » Thu Feb 03, 2011 9:13 pm

i think your confusing a game (probably in flash) with the imacros

from what i understand the redirect comes from your game, therefore game != imacros
imacros can only control sites that are called from within imacros
ddskary
Posts: 2
Joined: Thu Feb 03, 2011 2:27 pm

Re: really simple if, then help

Post by ddskary » Fri Feb 04, 2011 12:11 am

no. i don't want to control anything. i already have a script running to control the game. the devs are trying to make it harder to run that script by causing the browser to be redirected to a webpage that doesn't exist every time a specific action happens.

i want imacros to check the current URL of firefox. if the URL is anything other than what it's supposed to be, i want it to go back to the correct one.

currently i have imacros resetting the URL every 4 minutes, regardless of whether or not it has already been redirected.
Tom, Tech Support
Posts: 3601
Joined: Mon May 31, 2010 4:59 pm

Re: really simple if, then help

Post by Tom, Tech Support » Fri Feb 04, 2011 4:07 pm

Please see this FAQ.
Regards,

Tom, iMacros Support
Post Reply