How do I put Form Name in Variable?

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

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
viking
Posts: 244
Joined: Sun Mar 16, 2008 7:22 am

How do I put Form Name in Variable?

Post by viking » Mon May 26, 2008 10:49 pm

How do get the name of the [current] form and place it in a variable (e.g. !VAR1)?

For example, I may be on this page:
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:signon ATTR=NAME:submit&&VALUE:Log-in
or on this page:
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:keyform1 ATTR=NAME:Submit&&VALUE:Submit

In the 1st case, the Form name is "signon", while in the second it is "keyform1".
How would I make iMacros set !VAR1 to the Form name?
viking
Posts: 244
Joined: Sun Mar 16, 2008 7:22 am

Re: How do I put Form Name in Variable?

Post by viking » Thu May 29, 2008 4:18 am

bump... Is this not possible? Seems simple..?
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Re: How do I put Form Name in Variable?

Post by Tech Support » Fri May 30, 2008 10:16 pm

Just to clarify: Is the form name already in the macro?

TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:keyform1 ATTR=NAME:Submit&&VALUE:Submit

If it is in the macro, why do you need to put it in a variable?
viking
Posts: 244
Joined: Sun Mar 16, 2008 7:22 am

Re: How do I put Form Name in Variable?

Post by viking » Fri May 30, 2008 10:22 pm

No, the form name is not in the macro.
I will navigate to one of the 2 pages outside of the macro, and I need the macro to know which of the 2 pages I am on, e.g.
If I am on form#1 => action#1
If I am on form#2 => action#2
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Re: How do I put Form Name in Variable?

Post by Tech Support » Fri May 30, 2008 10:33 pm

If you only need to distinguish between two known websites (with known form names), you can simply check for a keyword (text) on the website, and then run macro1 (with action1) or macro2 (with action2).
viking
Posts: 244
Joined: Sun Mar 16, 2008 7:22 am

Re: How do I put Form Name in Variable?

Post by viking » Fri May 30, 2008 10:59 pm

Tech Support wrote:If you only need to distinguish between two known websites (with known form names), you can simply check for a keyword (text) on the website, and then run macro1 (with action1) or macro2 (with action2).
Sorry for being a newbie at this. How do I put the form name in the variable?
Post Reply