Jump to content
Sign in to follow this  
Orgins

_IEFormGetObjByName

Recommended Posts

Orgins

What do you do when there is no form name? It goes from <form method="POST">...ect to what I think is a form element. There is no form name what do I do?

<form method="POST">
                <!--nested table for form-->
                <table cellpadding="0" cellspacing="0" border="0">
                    <tr>
                        <td valign="top" style="padding-bottom: 5px;" colspan="2" class="form">
                   
                        </td>

                    </tr>
                    <tr>
                        <td valign="top" style="padding-bottom: 5px;" colspan="2" class="form">
                            <b>To:</b>
                            
                            
                        </td>
                    </tr>
                    <tr>
                        <td valign="top"  style="padding-bottom: 10px;" colspan="2">

                             <input type="text" style="width: 225px; border: 1px solid #000000; background-color: #E5E5E5;" name="to" value="">

I'm a newbie.Sorry if I don't reposed to your replays very fast.

Share this post


Link to post
Share on other sites
Orgins

Just tried leaving the form blank it didn't work...well crap.

Edited by Orgins

I'm a newbie.Sorry if I don't reposed to your replays very fast.

Share this post


Link to post
Share on other sites
Orgins

I tried the example script given.

#include <IE.au3>
$oIE = _IECreate ("The URL")
$oForms = _IEFormGetCollection ($oIE)
MsgBox(0, "Forms Info", "There are " & @extended & " forms on this page")
For $oForm In $oForms
    MsgBox(0, "Form Info", $oForm.name)
Next

Only one form was found and it's name was 0. But I tried using the form name"0" with _IEFormGetObjByName and it didn't work.

Edited by Orgins

I'm a newbie.Sorry if I don't reposed to your replays very fast.

Share this post


Link to post
Share on other sites
DaleHohm

use the index parameter of _IEFormGetCollection to get a reference to a specific form... if there is only 1, it's index is 0.

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.