if else

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
jayv
Posts: 13
Joined: Wed Oct 03, 2007 12:39 am

if else

Post by jayv » Tue Oct 23, 2007 6:28 pm

As i understand it, there is no scripting logic that i can use inside of a iim script itself. If that is true, how would one typically handle a situation like this... depending the version of software for the web inteface i am working with, i may see a logout button or a logout link (meaning, i would like to be able to execute something like...)

if (TAG POS=1 TYPE=A ATTR=TXT:Logout)
else (TAG POS=1 TYPE=A ATTR=TXT:Exit)

is there any means of doing this inside the script itself?

i don't want the failure of the first attempt to cause an error in the script - otherwise it returns an error code the calling application
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Post by Tech Support » Tue Oct 23, 2007 7:35 pm

In this case I recommend that you simply execute both commands and use ERRORIGNORE to avoid a macro error.

Code: Select all

SET !ERRORIGNORE YES
TAG POS=1 TYPE=A ATTR=TXT:Logout
TAG POS=1 TYPE=A ATTR=TXT:Exit
SET !ERRORIGNORE NO
youngyoshi
Posts: 2
Joined: Mon Oct 15, 2007 10:40 pm

Post by youngyoshi » Sun Oct 28, 2007 9:42 am

is there any way to keep loadcheck while having error ignore enabled
Post Reply