if image exists on page do this command?

Discussions and Tech Support specific to the iMacros Firefox add-on.
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
Posts: 69
Joined: Wed Apr 23, 2008 9:23 pm

if image exists on page do this command?

Post by questions » Sat Jul 25, 2009 5:58 pm

how do i only do a command if a certain image exists on a page?

so if img.gif exists then i want to do a command set or run a javascript file, but if it doesnt exist then not...
Marcia, Tech Support
Posts: 1095
Joined: Thu Jan 29, 2009 1:10 pm

Re: if image exists on page do this command?

Post by Marcia, Tech Support » Mon Jul 27, 2009 7:40 pm


The simplest solution is to tag the image. If it does not exist, the macro will issue an error and stop (as long as !ERRORIGNORE is set to NO). The following macro commands will not be executed.

If, on the other hand, the image is present, the macro will keep running.

Does it solve the case?

Post Reply