Avatar of rheasam
rheasam
 asked on

How to hit a url multiple times from script

I have page that times out firt few times. I want to have a vbscript that hits the url 4 times and then I can run it manually. What is the best way to do that?
VB ScriptWeb DevelopmentWeb Applications

Avatar of undefined
Last Comment
rheasam

8/22/2022 - Mon
rlandquist

How about this?  

It opens IE to the page you specify then waits 5 seconds and refreshes using the CTRL+F5 method and repeats  refresh 2 more times.

Let me know if this works for you.
Set ie = CreateObject("internetexplorer.application")
ie.Navigate "http://www.google.com"
ie.Visible = True
 
For i = 1 To 3
	WScript.Echo i
	WScript.Sleep(5000)
	ie.Refresh2(3)
Next

Open in new window

rheasam

ASKER
Can this be put in vbscript? Will this actually invoke IE an dbring it up or in the background?
ASKER CERTIFIED SOLUTION
rlandquist

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
rheasam

ASKER
I ran it, I see that it invokes IE. Also I want to close the IE after it hits it. What is the best way to do it. Also is there a way to hit the URL without invoking IE?
Your help has saved me hundreds of hours of internet surfing.
fblack61
SOLUTION
Allentkw

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
rheasam

ASKER
Ok, great. Let me try this and will award the points today.