Jump to content

Help with input boxes


Recommended Posts

Hi,

I'm looking to 'send' to an 'input box' although I am a little confused. This is the source code taken from the webpage.

<tr><td bgcolor='#ffffee'>

<b>Your name</b>

</td><td bgcolor='#ffffee'>

<input type='text' size=30 maxlength=30 name='name'></td>

<tr><tr><td bgcolor='#ffffee'>

<b>Your contact number<b>

</td><td bgcolor='#ffffee'>

<input type='text' size=30 maxlength=30 name='phone number'>

</td><tr>

Let's say I'm trying to fill in the 'Your name' field, which as the source code has named it 'name'.

I was hoping for some hints as to how I can improve the script :/ There are lots of input boxes on the page.

In this example I simply want to send "JOHN SMITH" to the field.

I tried the following code:

$oButtons = _IETagNameGetCollection ($oIE, "input")
For $oButton In $oButtons
    If $oButton.name = "name" Then
ControlSend($oButton, "", "[CLASS:Internet Explorer_Server; INSTANCE:1]", "JOHN SMITH")
Else
EndIf
Next

Thanks to anyone who can help me out!

Edited by skyinthesea
Link to comment
Share on other sites

  • 3 years later...

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...