|
-
Sep 7th, 2011, 10:11 PM
#1
Thread Starter
Junior Member
Help from a VBS to VB (noob)
First off I apologize for not being the expert in VB. I download VB and created a form with a webbrowser component. So, now my question comes down to the code being used.
Here is my .vbs, is there an easy way to place this code but in VB. I'm assuming something in the web browser component code field?
Set objIE = CreateObject("InternetExplorer.Application")
Dim http: set http= CreateObject("MSXML2.XMLHTTP")
http.open "GET", "http://www.thisisatestandwillfail2.co", false
http.send
If http.status = 200 then
' if return code equals something else, launch IE and point to another url
Wscript.Quit ' I would like it to load a local html file instead of quiting.
Else
objIE.Visible = True ' Set browser object visible
objIE.Navigate "http://www.thisisworking.com"
Wscript.Sleep(60000) ' Sleep for 60 seconds
objIE.Quit
End If
Any help is appreciated!
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
|