Sign in to follow this  
Followers 0
skyinthesea

Help with input boxes

4 posts in this topic

#1 ·  Posted (edited)

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

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  
Followers 0