How to run the same macro on different domains?

Information related to the use of iMacros for form filling and data upload.

Moderator: iMacros Moderators

How to run the same macro on different domains?

by Tech Support on Mon Dec 18, 2006 1: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.
User avatar
Tech Support
 
Posts: 5003
Joined: Tue Sep 20, 2005 12:25 pm

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

by km4n on Tue Apr 08, 2008 9:24 pm

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.
km4n
 
Posts: 0
Joined: Tue Apr 08, 2008 9:19 pm

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

by tom92120 on Mon Oct 27, 2008 12: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.
tom92120
 
Posts: 0
Joined: Mon Oct 27, 2008 11:34 am

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

by Tech Support on Thu Oct 30, 2008 5:56 am

tom92120, please make sure to remove the URL GOTO command from the macro.
User avatar
Tech Support
 
Posts: 5003
Joined: Tue Sep 20, 2005 12:25 pm


Return to How-To's and Examples for Form Filling

Who is online

Users browsing this forum: No registered users and 1 guest

-->