How to run the same macro on different domains?

Information related to the use of iMacros for form filling and data upload.
Post Reply
User avatar
Tech Support
Posts: 5003
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

How to run the same macro on different domains?

Post by Tech Support » Mon Dec 18, 2006 8:09 am

Question:
Lets say there are 2 or more different domains having the same
webform or webpage,

Domain1.com/page.html = Domain2.com/page.html = Domain3.com/page.html The 3 webpages above are similar and have the
same details to be filled in, just clicking here and there selecting
some options, but they are on different domains. Is your macro able
to fill them using the same script?

Answer:
(1) If the web pages are very similar and the only difference is a different domain, then the macro will run without changes on all domains. You only need to remove the URL GOTO=.... command manually. This command was inserted during macro recording. After this is done, then you manually go to one of the domains and start the macro.

(2) Alternatively, if there are differences between the forms, for example different link names or input boxes, you can still create one macro that works for all websites:

(2a) Use the wildcard * to make the TAG command fit for all your domains

Example: On domain1.com/page.htm you get
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:newsletterform ATTR=NAME:Email CONTENT=test@test.com

On domain2.com/page.htm you get
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:news ATTR=NAME:Email CONTENT=test@test.com

=> Create this TAG command
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:*news* ATTR=NAME:Email CONTENT=test@test.com


(2b) Assume, on domain3.com/page.htm you have
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:subscribe ATTR=NAME:Email CONTENT=test@test.com

Then you can use two lines and add the "ERRORIGNORE" command:
SET !ERRORIGNORE YES
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:*news* ATTR=NAME:Email CONTENT=test@test.com
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:subscribe ATTR=NAME:Email CONTENT=test@test.com

=> iMacros will use the line that works and ignores the other.
km4n
Posts: 0
Joined: Wed Apr 09, 2008 4:19 am

Re: How to run the same macro on different domains?

Post by km4n » Wed Apr 09, 2008 4:24 am

So I've created a macro that will run on different domains. The only problem I've encountered is that when the text boxes have asterisks by them, it doesn't output my information.

For example, a website will have a field but instead of naming it URL, the field is named *URL, (The * denoting that the field is required) and my macro doesn't work.

Here is my code:
TAG POS=1 TYPE=INPUT:TEXT ATTR=ID:*url* CONTENT=http://www.website.com

Any help with this would be greatly appreciated.
tom92120
Posts: 0
Joined: Mon Oct 27, 2008 6:34 pm

Re: How to run the same macro on different domains?

Post by tom92120 » Mon Oct 27, 2008 7:09 pm

I am on Firefox and need to put my phone number on certain places in different forms. I'd like to be able to click where I want my phone number and have a macro write the phone number wherever the cursor happens to be. How can I do that? I set up a macro but it always went to the actual form I originally did it on.
User avatar
Tech Support
Posts: 5003
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Re: How to run the same macro on different domains?

Post by Tech Support » Thu Oct 30, 2008 12:56 pm

tom92120, please make sure to remove the URL GOTO command from the macro.
Post Reply