Jump to content
Sign in to follow this  

Help with input boxes

Recommended Posts



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'>


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")

Thanks to anyone who can help me out!

Edited by skyinthesea

Share this post

Link to post
Share on other sites

I tried changing $oButton.name to value but I still am yet to produce any results.. I can't see whats going wrong with my code ;)

Share this post

Link to post
Share on other sites

I know it's WAY late but i think i see the issue in your code. You have it as buttons 2 times and button 2 times. 

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.