Computing.Net > Forums > Web Development > VB6 Webpage button press

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

VB6 Webpage button press

Reply to Message Icon

Name: vedekandy
Date: July 22, 2005 at 09:53:16 Pacific
OS: Win XP Pro SP2, VB6 SP6
CPU/Ram: Athlon XP2600, 512Mb
Comment:

I wonder if anyone can help me. I've been using VB6 for years, but never really had much experience with the IE side of things. My "mission" is to write a program for VB6 that automates a button press on a webpage when ran. I thought this would be simple, but it seems not!

This is the code I have so far, thanks to other people's advice:

Private Sub Form_Load()
Dim oIE As Object, sURL As String
sURL = "http://www.rpgtopsites.com/in.php3?list=978316149&site=kingdomrpg"
Set oIE = CreateObject("InternetExplorer.Application")
oIE.Visible = True
Call oIE.navigate("http://www.rpgtopsites.com/in.php3?list=978316149&site=kingdomrpg")
Do Until oIE.LocationURL = sURL And oIE.readyState = 4
DoEvents
Loop
oIE.document.Form1.submit1.Click
End Sub

If I try this, the page loads fine ... then I get Error 438, "Object does not support this property or method". So then I changed the second to last line to this:

oIE.document.Forms(0).submit

This doesn't give me an error - but it also doesn't work. All that happens is that the page loads, but it hasn't actually submitted anything by pressing the button. The code on the actual page that governs the form is as follows:

<form action=in.php3 method=post>
<input type=hidden name=val1 value="xxxxxxx">
<input type=hidden name=val2 value="xxxxxxx">
<input type=submit name=val3 value="Press the button!">
</form>

Am I missing something really elementary here? All that seems to happen when VB6 triggers the "submit" thing is that it loads the in.php3 page, but without having passed anything to it, or so it seems. Is there another way to go about this?

-Andy



Sponsored Link
Ads by Google

Response Number 1
Name: jam14online
Date: July 25, 2005 at 13:26:19 Pacific
Reply:

I don't know much about that code but I can recommend AutoIt for this sort of task.


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: VB6 Webpage button press

I Need Ideas www.computing.net/answers/webdevel/i-need-ideas/382.html

a box and a save button www.computing.net/answers/webdevel/a-box-and-a-save-button/1860.html

Free Program For Webpage Protection www.computing.net/answers/webdevel/free-program-for-webpage-protection/3056.html