Page 1 of 1

How to run the same macro on different domains?

Posted: Mon Dec 18, 2006 8:09 am
by Tech Support
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.

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

Posted: Wed Apr 09, 2008 4:24 am
by km4n
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.

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

Posted: Mon Oct 27, 2008 7:09 pm
by tom92120
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.

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

Posted: Thu Oct 30, 2008 12:56 pm
by Tech Support
tom92120, please make sure to remove the URL GOTO command from the macro.