|
-
Aug 31st, 2000, 09:43 AM
#1
Thread Starter
Fanatic Member
How can you automatically click a button on a web page!!!
Visual Basic 6.0
Visual C++ 5
Delphi 5

-
Aug 31st, 2000, 09:51 AM
#2
Lively Member
Dude, I am not sure what you are aiming at. You could place a heavy object on the return key when your internet explorer is up, and then the default key will automatically press, or are you trying to incorporate it into VB?
~Brian
-
Aug 31st, 2000, 09:57 AM
#3
Thread Starter
Fanatic Member
Ok whiteboy! I meant that when I enter a username and password into their fields, I want my program to click on the login button or post the form!!!
Visual Basic 6.0
Visual C++ 5
Delphi 5

-
Aug 31st, 2000, 10:03 AM
#4
Lively Member
Uh, my mac automatically goes after a supplied username and pass is incorporated. In windows Internet Explorer..., I couldn't kind anything, hold down ALT+T then ALT+O . Look there, under advanced, and see if there is a default that can help u out. I apologise that I couldn't help you any further.
~Brian
-
Aug 31st, 2000, 12:15 PM
#5
Fanatic Member
I would recomd using the mouse move and mouse click events. Or you could send the Tab Key several times untill ir reached the submit button and then send the eneter key:
Code:
'Mouse Move and click
'Declx.
'Mouse Move
Private Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long
'Mouse Events
Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
Private Const MOUSEEVENTF_LEFTDOWN = &H2
Private Const MOUSEEVENTF_LEFTUP = &H4
'On the form
Public Sub LeftDown()
On Error Resume Next
mouse_event MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0
End Sub
Public Sub LeftUp()
On Error Resume Next
mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 0, 0
End Sub
Public Sub Command1_Click()
'Set Cursor Pos (You'll have to figure this out by testing the locations
SetCursorPos 680, 472
'Press The Button
LeftDown
LeftUp
End Sub
Sending the tab key is pretty easy
Code:
SendKeys "{TAB}" 'do it a number of times untill it reached the submit button.
'Then send the enter key
SendKeys "{ENTER}"
Gl,
D!m
-
Aug 31st, 2000, 01:54 PM
#6
New Member
I've run into something similar but unfortunaly no resolution. I tried to get a hwnd of the button of a web page and then send a click. All I managed was a hwnd of the entire web form.
John
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|