-
Hi, I need help that in my program that goes like this:
Private Sub Command1_Click()
A = shell("C:\@IE\ie.exe", 1)
AppActivate A
MsgBox "Please go to the website and enter the details, tab to go to sent button!"
Check = True: Counter = 0
Do
SendKeys "~", True
Do While Counter < 101
SendKeys "~", True
PauseTime = 10
Start = Timer
Do While Timer < Start + PauseTime
Loop
Finish = Timer
SendKeys "%{LEFT}", True
Counter = Counter + 1
If Counter = 100 Then
Check = False
Exit Do
End If
Loop
Loop Until Check = False
MsgBox "Done 100x"
End Sub
There is a problem in thius program as this is my first time using vb4 and my vb6 can't work as there say that I need to reinstall MSDN eventhough I fully installed it! (This is the 2nd problem I hope people can help me too...)
Firsty of all, this program has a click button, when clicked, will first activate the internet explorer, then stop to alert me and allow me to go to the website i want and go to the "submit" button on the website, then i can fill in what i want, then i press "ok" from the msgbox to continue the program and let it send "enter" to the "submit" button in the IE5.5 and then wait 10secs for the website to submit the details and then autorefers to another page in IE, after my vb wait 10sec, it will then SendKeys "%{LEFT}", True and so IE would go back to the "submit" page again. and the process repeats again for 100 times.
the problem i met in win98 is that IE keeps opening and opening and doesn't give me time to input the info on the website and i'm not sure if the keystrokes is working.
hope that someone can help me correct the thing above or at least suggest an alternatives...
this program which i want to create, main objective is to submit information on a website 100x. hope that someone can help me on that.
thanks alot
-
Try creating your own browser with the Internet Explorer Refrance
-
Try this:
Code:
Private WithEvents ie As InternetExplorer
Private Sub Form_Load()
Set ie = New InternetExplorer
ie.Navigate "www.yahoo.com" 'Page to start at
ie.Visible = True
End Sub
Private Sub ie_DocumentComplete(ByVal pDisp As Object, URL As Variant)
Static Counter As Integer
Counter = Counter + 1
If Counter > 1 And Counter <= 100 Then
ie.Navigate URL
DoEvents
End If
End Sub
You must activate the "Microsoft Internet Controls" Referance! NOT CONTROL!
To Use:
Tell users to submit the page you want, it will reload the new page 100 times. Is the form method GET, otherwise, the code is more complicated!
-
mess with the code i gave you, you should figure something out, i didn't understand your question. Please post to the message board, not my email.
thank you
-
help again
sorry...let me clear up the misunderstanding....
i don't know where is the message board...is it the one i'm typing in now? if u try the website, you will understand what i'm saying...please try...
anyway, what i hope to create is a vb program that first opens IE, then pause and ask me to continue thus allowing me to go the website, fill the answers and information for the 1st time, then after i "tab" till the submit button on the website and the program would send enter key to the present IE window to submit after i click on "continue" button "ask" by the program. then the program would wait 10secs after the next two redirections of websites, it would again send two times the "shift-left" keystrokes to
IE and thus coming back to the original website again with the filled details and focus is on the "submit" button. then the programs continues to send "enter"...and the process goes on for 100 times.
http://singapore.cnet.com/contest/mp3/contest.html
the objective: to save me time siting in front of the computer to submit answer through the website and repeat the process 100x........
hope that you can help me....anyway, you are the only one who can help me since no one else reply to me....
-
Just play around with send keys or my code. Try things, etc.