Auto fill form with iMacros .net component

Discussions and Tech Support related to using the iMacros Component for .NET in your applications.
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
dolluatdoll
Posts: 4
Joined: Mon Oct 27, 2014 11:15 am

Auto fill form with iMacros .net component

Post by dolluatdoll » Mon Nov 03, 2014 9:45 am

Hello,

I am trying to auto fill in login form when page loaded

here is my code:

Code: Select all

Dim macro
        macro = "CODE:"
        macro = macro + "VERSION BUILD=10.2.26.4235" + vbNewLine
        macro = macro + "TAB T=1" + vbNewLine
        macro = macro + "TAB OPEN" + vbNewLine
        macro = macro + "TAB T=2" + vbNewLine
        macro = macro + "URL GOTO=https://mybank.icbc.com.cn/icbc/enperbank/index.jsp" + vbNewLine
        macro = macro + "FRAME F=1" + vbNewLine
        macro = macro + "SET !VAR1 do<SP>re<SP>mi" + vbNewLine
        macro = macro + "TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:logonCardNum CONTENT={{!VAR1}}" + vbNewLine
        macro = macro + "SET !ENCRYPTION NO" + vbNewLine
        macro = macro + "DS CMD=KEY CONTENT={TAB}" + vbNewLine
        macro = macro + "TAG POS=1 TYPE=SELECT CONTENT=defgh" + vbNewLine

        Dim res As Integer
        res = iim.Play(macro)
When the page loaded, I passed the variable "{!VAR1}" into the Card Number field, and then I passed a {TAB} to let the cursor go to the "Logon Password" field
As a result, it was failed, the cursor stayed in the card number. (Please see attachment)

I believe that the login form is an ActiveX control. I have no way to find the exact name of ID of the "Logon Password" field, that's why I try to send a {TAB} to go to the next field. I think it is also not a appropriate manner to do so.

Please! If anybody can give me some advice for filling the kind of form in a website.
Attachments
failed fill.jpg
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Auto fill form with iMacros .net component

Post by chivracq » Mon Nov 03, 2014 1:24 pm

Have you tried using this?:

Code: Select all

TAG POS=1 TYPE=INPUT:PASSWORD ATTR=NAME:* CONTENT=defgh
(And the Name will probably be "pwd" or "Password" anyway...)

Try recording using iMacros on Firefox otherwise (with different Recording Modes), it might be able to identify the Element...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
dolluatdoll
Posts: 4
Joined: Mon Oct 27, 2014 11:15 am

Re: Auto fill form with iMacros .net component

Post by dolluatdoll » Tue Nov 04, 2014 9:53 am

appreciated for your reply :wink:

unluckily, the site works only with Internet Explorer.
And "TAG POS=1 TYPE=INPUT:PASSWORD ATTR=NAME:* CONTENT=defgh" doesn't work :cry:
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Auto fill form with iMacros .net component

Post by chivracq » Tue Nov 04, 2014 12:12 pm

dolluatdoll wrote:appreciated for your reply :wink:

unluckily, the site works only with Internet Explorer.
And "TAG POS=1 TYPE=INPUT:PASSWORD ATTR=NAME:* CONTENT=defgh" doesn't work :cry:
No-no, it works with FF, you just have to change your User Agent to FF20, like I told you in your other Thread... I wanted to give a try again yesterday, but that's this weird Site with the Chinese Plugin that I refuse to install...

Hum, you might be right actually, only IE was supported for the English Version, I think I remember... But as I told you before, you could always log in using the Chinese Logon Page and switch back to English once logged in... (Dunno if you've tried anything in this direction...)

And you can always save the Page locally and (try to) open it with FF to try to identify the Field. (You may need to edit the Source to circumvent the Browser Checks...)
Last edited by chivracq on Mon Nov 10, 2014 12:03 pm, edited 1 time in total.
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
dolluatdoll
Posts: 4
Joined: Mon Oct 27, 2014 11:15 am

Re: Auto fill form with iMacros .net component

Post by dolluatdoll » Mon Nov 10, 2014 10:59 am

I've just read the other Thread, I think he is doing something similar as mine, actually the mentioned bank page is only an example of showing the "ActiveX control" field.

There are a lot of website using ActiveX control, I'm sorry that only ICBC got an English page, That's why I use it as an example.
What I trying to do is "if iMacros can auto-fill an ActiveX control field will no matter iMacros Script or Direct Screen Mode"
Since I try both ways but both way are not working, it just cannot detect the name/id of the field

I believe that it isn't an "input", so "TYPE=INPUT:PASSWORD" doesn't locate the field

Code: Select all

TAG POS=1 TYPE=INPUT:PASSWORD ATTR=NAME:* CONTENT=defgh
When I read the source code of the password field, it is something embedded as an object,

Code: Select all

<OBJECT onkeyup="getfocus1('KeyPart', event);detectCapsLock('logonform','safeEdit1',500,300,400,'logontb');" onfocus="detectCapsLock('logonform','safeEdit1',500,300,400,'logontb')" onblur="closeCapTip('logonform','safeEdit1')" id=safeEdit1 codeBase="/icbc/newperbank/AxSafeControls.cab#version=1,0,0,13" classid=CLSID:73E4740C-08EB-4133-896B-8D0A7C9EE3CD width=145 height=21><PARAM NAME="_cx" VALUE="3836"><PARAM NAME="_cy" VALUE="556"></OBJECT>
I've read a lot about ActiveX control, someone said it is designed to prevent bot-software to auto-fill forms.....

Anyway, thank you for all you've done! :)
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Auto fill form with iMacros .net component

Post by chivracq » Mon Nov 10, 2014 12:24 pm

dolluatdoll wrote:I've just read the other Thread, I think he is doing something similar as mine, actually the mentioned bank page is only an example of showing the "ActiveX control" field.

There are a lot of website using ActiveX control, I'm sorry that only ICBC got an English page, That's why I use it as an example.
What I trying to do is "if iMacros can auto-fill an ActiveX control field will no matter iMacros Script or Direct Screen Mode"
Since I try both ways but both way are not working, it just cannot detect the name/id of the field

I believe that it isn't an "input", so "TYPE=INPUT:PASSWORD" doesn't locate the field

Code: Select all

TAG POS=1 TYPE=INPUT:PASSWORD ATTR=NAME:* CONTENT=defgh
When I read the source code of the password field, it is something embedded as an object,

Code: Select all

<OBJECT onkeyup="getfocus1('KeyPart', event);detectCapsLock('logonform','safeEdit1',500,300,400,'logontb');" onfocus="detectCapsLock('logonform','safeEdit1',500,300,400,'logontb')" onblur="closeCapTip('logonform','safeEdit1')" id=safeEdit1 codeBase="/icbc/newperbank/AxSafeControls.cab#version=1,0,0,13" classid=CLSID:73E4740C-08EB-4133-896B-8D0A7C9EE3CD width=145 height=21><PARAM NAME="_cx" VALUE="3836"><PARAM NAME="_cy" VALUE="556"></OBJECT>
I've read a lot about ActiveX control, someone said it is designed to prevent bot-software to auto-fill forms.....

Anyway, thank you for all you've done! :)
Oh yeah..., when I recognized the same Web-Site like in the other Thread, I took for granted it was the same User asking (again) more or less the same Question and I didn't check the other Thread at all as I still had it in my mind, and I answered in this current Thread as a Follow-up on my Tests in the other Thread thinking that you were the same Person:
- Activex Input issue
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
fastRSgold
Posts: 4
Joined: Tue Nov 25, 2014 6:10 am

Re: Auto fill form with iMacros .net component

Post by fastRSgold » Tue Nov 25, 2014 6:12 am

The top 2 multiple your competitors FIFA 15 Coins might pursue to Hollywood in order to compete in The Cod Championship.Registration particulars to the Hawaiian along with New Zealand on the

internet qualifiers will probably be launched in Wednesday January. Thirteen. The residual clubs may include clubs through throughout Parts of asia as well as South america.

Additional information for all those world of warcraft gold local competitions will be announced on the Call of Duty eSport internet site."More individuals play Call of Duty multi player every day

than observe the normal standard time bet on the NBA.
Post Reply