Link to home
Start Free TrialLog in
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?
Avatar of rlandquist
rlandquist
Flag of United States of America image

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

Avatar of rheasam
rheasam

ASKER

Can this be put in vbscript? Will this actually invoke IE an dbring it up or in the background?
ASKER CERTIFIED SOLUTION
Avatar of rlandquist
rlandquist
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of 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?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of rheasam

ASKER

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