|
-
January 28th, 2000, 07:32 PM
#1
sendkeys procedure
how can I make it so that IE 5 loads up. Then it goes to a website. Then it presses F5 on IE 5. After that, it pauses for like 5 seconds.... how could I do that?
-
January 29th, 2000, 10:22 AM
#2
Re: sendkeys procedure
You can't. Well you could but its not practical. You would have to click inside the address bar and wait till you programm send the address. If you did do it you would do it like this:
------------------------------------------
Private Declare Function Sleep Lib "Kernel32" (ByVal dwMilliseconds As Long) As Long
Private Sub Form_Load()
Sleep 5000 'Give you five seconds to click inside the address bar
SendKeys "http://www.vb-world.net"
Sleep 1000 'Wait 1 second
sendkey "{F5}"
End Sub
------------------------------------------
Really there is no point.
-
January 29th, 2000, 07:08 PM
#3
Re: sendkeys procedure
Actually, rino_2's post to this question is partly incorrect. You can open up a URL and then have it refresh. Here is the code:
private Declare Function ShellExecute& Lib "shell32.dll" Alias "ShellExecuteA" (byval hwnd as Long, byval lpOperation as string, byval lpFile as string, byval lpParameters as string, byval lpDirectory as string, byval nShowCmd as Long)
private Declare Function Sleep Lib "kernel32" (byval dwMilliseconds as Long) as Long
private Const SW_MAX = 3
private Const OPEN_URL = "http://gatecontrol.pair.com"
private Sub Command1_Click()
res& = ShellExecute(hwnd, "open", OPEN_URL, vbNullString,CurDir$, SW_MAX)
Sleep (3000)
SendKeys "{F5}"
End Sub
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
|