Need to send keystrokes to multiple fields on a 3rd party webpage from my vb5 pgm.

dennisrose

New Member
My problem is similar to your prior post 176859.

I have the need to input name and address info from my vb5 program into another system's name and address fields on their web page.

The code I am using below I got from your post 176859 but it does not work. I am using "whitepage's" website to test this code. I used Whitepage's HTML to find the field names.

What am I doing wrong? Please help!!! Thanks


Dim PostURL As String
PostURL = www.whitepages.com
With CreateObject("InternetExplorer.Application")
.navigate PostURL & _
"?basic_location=23229;basic_name=frost;basic_firstname=jack"
.Visible = True
Do While .busy
DoEvents
Loop
End With
 

My Computer

Re: Need to send keystrokes to multiple fields on a 3rd party webpage from my vb5 pgm

Hello and welcome to the Vista Forums!

For WhitePages, until their website changes, there is an easy solution. Do some test searches, and look at the URL, and most importantly, reverse engineer the URL structure. For WhitePages, it is really, really simple! An example search!

http://www.whitepages.com/dir/location/lastname/firstname

It is that simple! Just use a script to navigate to a generated URL.

Richard
 

My Computer

System One

  • Manufacturer/Model
    Dell XPS 420
    CPU
    Intel Core 2 Quad Q9300 2.50GHz
    Motherboard
    Stock Dell 0TP406
    Memory
    4 gb (DDR2 800) 400MHz
    Graphics Card(s)
    ATI Radeon HD 3870 (512 MBytes)
    Sound Card
    Onboard
    Monitor(s) Displays
    1 x Dell 2007FP and 1 x (old) Sonic flat screen
    Screen Resolution
    1600 x 1200 and 1280 x 1204
    Hard Drives
    1 x 640Gb (SATA 300)
    Western Digital: WDC WD6400AAKS-75A7B0

    1 x 1Tb (SATA 600)
    Western Digital: Caviar Black, SATA 6GB/S, 64Mb cache, 8ms
    Western Digital: WDC WD1002FAEX-00Z3A0 ATA Device
    PSU
    Stock PSU - 375W
    Case
    Dell XPS 420
    Cooling
    Stock Fan
    Keyboard
    Dell Bluetooth
    Mouse
    Advent Optical ADE-WG01 (colour change light up)
    Internet Speed
    120 kb/s
    Other Info
    ASUS USB 3.0 5Gbps/SATA 6Gbps - PCI-Express Combo Controller Card (U3S6)
Re: Need to send keystrokes to multiple fields on a 3rd party webpage from my vb5 pgm

Richard,

Thanks for the reply. I almost included your solution in my original request, but here is the problem.

On the web page that I need to update (with name and address info), I may not need to input data into all of the fields, so..I need to be able to address each field individually and update only those fields that I have new data for.

How can I accomplish this?
 

My Computer

Re: Need to send keystrokes to multiple fields on a 3rd party webpage from my vb5 pgm

I just answered my own question. Here is the code I used:

Screen.MousePointer = vbDefault
PostURL = www.whitepages.com
With CreateObject("InternetExplorer.Application")
.navigate PostURL
.Visible = True
Do While .busy
DoEvents
Loop

.Document.getElementsByName("basic_location").Item(0).Value = "dallas, tx"
.Document.getElementsByName("basic_firstname").Item(0).Value = "jack"
.Document.getElementsByName("basic_name").Item(0).Value = "frost"
End With



Hope this helps someone else!!
 
Last edited:

My Computer

Back
Top