Shell IE, Load Webpage && Log Whether Webpage Loads Or Not
Dear all,
How would I go about opening up Internet Explorer, loading a webpage (www.yahoo.com) and reporting back to VB whether the request was successful or not.
I'd like to perform this routine as a way of checking that my PC can connect to the internet... as if it can't, it would be a big indicator that our proxy server has gone down or needs restarting. (I'm writing a network monitoring program)
I'm getting as far as shelling IEXPLORE.exe... but I am then lost as to how to request a website and also a way of checking whether the website loads or not.. Could anyone please offer me some assistance?
Thanks in advance....
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Need To Pause/Wait While A Webpage Loads?
I am in the process of writing a program that has to download data from over 200 webpages(not source data I don't want the HTML Coding), the program works fine in the manual mode with a vbOKOnly as I visually watch the pages load, I would like to be able to have the program do this for me.
Here is a look at what I have so far!
Code:
Private Sub Command3_Click()
Dim x As Long, strFF As String, sURL As String, curURL As String, str As String, i As Long
sURL = App.Path & "URLList.ini" 'File containing the URL List
strFF = App.Path & "TextFile.txt"
Open sURL For Input As #3
Do Until EOF(3)
Input #3, str
curURL = str
i = i + 1
WebBrowser1.Navigate2 curURL
MsgBox i & "--> " & str, vbOKOnly 'my Temporary MsgBox Fix
'Need a pause/wait statement here
Text1.Text = WebBrowser1.Document.Body.InnerText
Open strFF For Append As #1
Print #1, Text1.Text
Close #1
Loop
Close #3
End Sub
Any Suggestions greatly appreciated.
TIA
inov8iv
Shell Webpage
How would I open a local webpage(saved on PC) using internet explorer? I'm pretty sure it would involve the shell comand (of which I have little, or no experience), but I don't know the specifics. Thanks.
Load A Webpage
Hello,
I want to load in visual basic a webpage. I don't want to do anything with it, only load it. The page i want load contains a script what will executed then.
Is it possible, when yes, how can I load this webpage?
edit: I am now thinking, it is also handy to know how to load the site into a variable, can someone also tell me how i can do that?
Derk
Webpage Load ?
I want to know how I can execute something written in VB (whether it be a macro or a program) when a web page is first activiated, any help?
--I want the macro/program to be ran automatically, with no user input.
How To Load Webpage In VB6?
I would like to open a webpage (text files) in Visual Basic 6, and store the results in an array. I don't want the user to see the webpage opening up, like running shell explorer or shell start. I found quite a few examples online, but none of them worked. In Perl, this is all the I would have to do:
PHP Code:
use LWP::Simple;
local $www='http://www.google.com';
my @ray=get $www;
I am an Unix (C, Perl, Shells, etc) programmer, and this is one of my first attempts at Windows programming. So, please be kind and help me out.
Thank you
Waiting For A Webpage To Load
hi,
I'm having troubles loading a webpage, waiting for the load to finish, then read the source and get data from it.
What I currently do is this: I use one sub to load the page (using a webcontrol) and then another sub: web1_DocumentComplete that gets the data.
But this is how I would like it to be: I want the .navigate command and the _DocumentComplete in one function, something like this:
Code:
private function get_data(byval site as string)dim source as string
web1.navigate site
**wait for the page to load**
... (code that gets the source from web1)end function
I dont want my script to wait a specified timeperiod, as I want my script to work as fast as possible, and I want it to work for every user.
Anyone knows what code I should use to '**wait for the page to load**' ?
Thx
I Can't Get The Webpage To Load The Next Page!
I'm trying to get my webcontrol to click on the NEXT button so the second page will load. For some reason I keep getting this URL:
http://www.domain.com/javascript:NextPage('1')
here's part of the VB code
Code:
c = wb.Document.body.innerHTML
i = InStr(c, ">Next</A>")
If i = 0 Then
Label5 = "All IDs collected."
Command4_Click
Else
i = InStrRev(c, "href=""", i)
c = Mid(c, i + 6)
i = InStr(c, """")
c = left(c, i - 1)
c = Replace(c, "&", "&")
If left(c, 5) <> "http:" Then c = left(wb.LocationURL, InStr(8, wb.LocationURL, "/")) & c
tmrTimeout.Enabled = True: Recollect = True
wb.Navigate c
here is the HTML:
HTML Code:
<script language="JavaScript">
<!--
function NextPage( page )
{
document.PageForm.page.value = page;
document.PageForm.submit();
}
//-->
</script>
<td align="right" width="150">
<a href="javascript:NextPage('1')">Next</a> >
</td>
Load Webpage From Browser
Hey gang!
I would like to write a verification script in VBScript that would prompt the user for name and password. It would then check the stored information and if the user has rights to see a page, then it can load the page.
If not, then load a blank page or stop altogether.
I can figure out the user input part, but being able to open a page from the browser is what I need help with.
Does anyone know how to do this?
Thanks for your time.
JazzBass
------------------
21 yr old beginner VB Programmer
VB 6 Professional @ Home
VB 3 Professional @ the Office
[This message has been edited by JazzBass (edited 12-01-1999).]
Load Webpage From Browser
Hey gang!
I would like to write a verification script in VBScript that would prompt the user for name and password. It would then check the stored information and if the user has rights to see a page, then it can load the page.
If not, then load a blank page or stop altogether.
I can figure out the user input part, but being able to open a page from the browser is what I need help with.
Does anyone know how to do this?
Thanks for your time.
JazzBass
------------------
21 yr old beginner VB Programmer
VB 6 Professional @ Home
VB 3 Professional @ the Office
[This message has been edited by JazzBass (edited 12-01-1999).]
How To Load A URL Webpage In VB Window
Hi guyes. I am new to this forum but i found it very useful . I am new to VB programing alo. I will be very happy if some one help me how to make a window that loads a URL such as www.mysite.com with in the VB window when we click on its .exe . I am using VB 4 so please send me some links and help me how to do this. Thanks
Load Data From Combobox Of Webpage
Hi,
I have combobox on web page(IE). I'd like save data items of combobox ("red (free)", "green(full)",...) into array of string in my program.
Could you help me please.
This is example web page:
HTML Code:
<?xml version="1.0" encoding="iso-8859-2"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Pokus</title>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250" />
</head>
<body onLoad="document.f.textarea.focus()">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<form name="f" action="any_URL" method="post"><input type="hidden" name="op" value="textpageng" />
<input type="hidden" name="rid" value="4057684" />
<input type="hidden" name="aid" value="0" />
<input type="hidden" name="js" value="0" />
<input type="hidden" name="skin" value="2" /><tr>
<td nowrap="nowrap" style="width: 100%;">
<td nowrap="nowrap" class="tdb"><select name="target">
<option value="~" selected>-color-</option>
<option value="Red" >Red (free)</option>
<option value="Green" >Green (full)</option>
<option value="Yellow" >Yellow(free)</option>
<option value="Black" >Black (full)</option>
<option value="White" >White (free)</option>
</select>
</td>
</td><td nowrap="nowrap" class="btn">
</td>
</tr></form></table></body>
</html>
Load A Webpage Once At Start-up Of Program
Hey, i am trying to make one webbrowser navigate to a page at the start of a program, but i don't know how to go about doing it, so any help is appreciated, thanks !
I mean it does it automatically so the user doesn't have to click...
EDIT: Totally forgot about HTML Library components... TX !
Webpage Will Only Load, If A Msgbox Is In The Code
Hi All,
When I navigate to a webpage using:
webbrowser.Navigate("mypage.com")
I can wait for the page to load in my web browser control by doing:
VB Code:
While brWeb.ReadyState <> SHDocVw.tagREADYSTATE.READYSTATE_COMPLETE Application.DoEvents() End While
Now i need to click a button in the web browser programatically by doing (to call the next page):
Item.click()
(where item is the submit button)
The problem is now if I call:
VB Code:
While brWeb.ReadyState <> SHDocVw.tagREADYSTATE.READYSTATE_COMPLETE Application.DoEvents() End While
straight after this it thinks readyState is already complete because it doesn't seem to load the new webbpage in the first place(the url is still the same). It will only load the web page if I put a messagebox in my code after the "item.click".
Why is this? Any ideas what I can do about it? I can't have a message box in there and if I don't it doesn't load the page?!?
Huperlink, Or Cmd Button To Load Webpage
Hey, how would i make a simple hyperlink to a website?
Or, how would i make a email address (when clicked) open up a blank mail page?
Is it easier to make a cmd button that says, "Visit my Site" and when clicked make it open a website??
Automated Webpage Load Every 24 Hours,help Please!!!
I was wondering how i could make the following webite load every 24 hours in internet explorer 6.
http://www.outwar.com/page.php?x=1315630
I would like the program that makes http://www.outwar.com/page.php?x=1315630 load up every 24 hours to automaticlly set itself to run on startup when i log.
Can this be done and how?
Thanx in advance!!!
Waiting For WebPage Load To Continue Code
Hey guys I need help yet again, good new is I'm starting to get a better handle on things. Right now I'm bringing up a webpage entering a password pressing enter and then I want to wait for the page to load before I perform my next step which will yet again require another page load, and this repeats a few times.
I select buttons with each page load using mouse events, I know I can do this with modyfing the HTML DOM i believe its called but im still trying to understand that, in the meantime, im just working on getting the code to wait for the page to finish loading before it continues.
Currently I have it run a function that has it wait a specified amout of miliseconds before it runs
Thanks in advance!
Dim WinWnd As Long
Dim ButtonHandle As Long
ClStatus = txtClosingStatus.Text
TabW = 100
MOUSEEVENTF_ABSOLUTE = &H8000
MOUSEEVENTF_MOVE = &H1
MOUSEEVENTF_LEFTDOWN = &H2
MOUSEEVENTF_LEFTUP = &H4
Shell "C:Program FilesInternet ExplorerIEXPLORE.EXE http://webprogram", vbMaximizedFocus
WaitMS 5000 'waits 5000 miliseconds
WinWnd = FindWindow("IEFRAME", "http://webprogram- Windows Internet Explorer")
PressString "password", True 'enters the password
WaitMS 500 'waits 500 miliseconds
PressKeyVK keyReturn, True, False, True 'presses the return key
WaitMS 3000 'Waits 3000 miliseconds
If there is someway to replace the WaitMS Function with one to wait until the page loads, thats what i need...thanks!!!
How To Load A Webpage Page In Visual Basic 4 Form
Hi all. i am trying to create a vb form in visual basic 4 that loads wepage when the form is opend. I righ clicked on the new form and clicked on view code then i typed the following code:
Code:
Private Sub Form_Load()
Webbrowser1.Navigate "www.vbforums.com"
End Sub
The i went to file and make exe file and it created for me the exe fiile but when i run it i get this error :
Code:
Run-time error '423':
object required
ok
could an expert help me solve this problem and be able to load a wepage inside the form.Thanks
Programatically Clicking Submit In A Web Browser Doesn't Load Next Webpage
Hi,
I load a webpage into my webbrowser and then programatically click the submit button on the page, which should load the next page. The problem is it doesn't unless I place a message box in the code. My code goes something like the following:
Code:
'Currently on webpage 1
input.click() 'the submit button to webpage 2
while axwebbrowser1.readystate <> readystate.complete do
application.DoEvents
end while
msgbox("Only works if this is in")
xxxxxx'Other code to go to other webpages 3, 4,& 5 using the webbrowser.navigate command DoEvents works for this and the webpages are shown
(The syntax may not be quite right on the above as I don't have my code to hand at the moment)
The "application.DoEvents" is never called (this is not because of the syntax btw) readystate is always equal to complete and when I check the URL out it is still on the first page (the submit button one). (There is no point just having the "application.DoEvents" on its own either cos VB doesn't think there are any events to do). VB only goes and loads webpage 2 if the msgbox is there otherwise it will do something like a page not found on webpage 2 and go on to load webpage 3, 4 and 5. Why is this and why doesn't DoEvents work when you are programatically clicking on a webpage, but does when you use the navigate method? Any ideas with what I can do to overcome this problem and have my webpage load and display when .click is called?
Cheers
Shell - App Loads Into Processes?
Hello,
I am writting an application monitor (a service - using ntService ocx) to ensure that my app is always running. Not at log in, but at start up.
The problem I've got is that when I call Shell or ShellExecute from my service the app loads into the processes and does not show on the desktop. When I run the code outside of the service it seems to work okay??
Here is a snippet of my code -
Code:
If Not modAppRunning.CheckForProcByExe(strAppName) Then
' Not found start it
retVal = Shell(notepad.exe, vbNormalFocus)
If retVal <> 0 Then
MsgBox "Started by the Service (" & NTService.DisplayName & ")"
Else
MsgBox "Error With Launch!"
End If
Else
MsgBox "Already Running"
End If
Does anyone know why this is happening? Is there a way round it or a better way of doing it even?
Cheers Al
Shell - App Loads Into Processes Not DeskTop?
Hello,
I am writting an application monitor (a service - using ntService ocx) to ensure that my app is always running on a server. Not at log in, but at start up and then to ensure that it's running at all times thereafter.
The problem: When I call Shell or ShellExecute from my service the app loads into the processes and does not show on the desktop. When I run the code outside of the service it seems to work okay??
Here is a snippet of my code -
Code: If Not modAppRunning.CheckForProcByExe(strAppName) Then
' Not found start it
retVal = Shell(notepad.exe, vbNormalFocus)
If retVal <> 0 Then
MsgBox "Started by the Service (" & NTService.DisplayName & ")"
Else
MsgBox "Error With Launch!"
End If
Else
MsgBox "Already Running"
End If
Does anyone know why this is happening? Is there a way round it or a better way of doing it even?
Cheers Al
Webpage
Ok, I have a browser and when a user is at a page like yahoo and he pushes like search. I need that to trigger an event. Does anybody know how I would do that?
Thanks!!!!!!!!!!
Best Way To Get Vb Onto A Webpage
I want to write a program that I want to be accessible via a web page. What's the best route to take for something like that?
I've looked into activex, but don't know too much about it. Is that the only option?
Webpage
Gday all
Is someone able to tell me how to translate a simple VB program into VB Script for publication on a website?
Is someone able to tell me if this is possible?
Cheers,
Tom.
VB In Webpage
Can someone tell me how i can make a registration form for a webpage in VB? I am talking about a form that people fill out information and click submit and it is sent in. I have no experience in web programming...I suspect that VB doesnt do any web apps. I hope I am wrong. Any help is appreciated.
VB And Webpage
Is it possible to build webpages with Visual Basic code? I'm a beginner and I'm looking to create a simple websites with all the normal VB objects like text boxes, drop menu's, and even databases. Is this possible? I think there's a option to choose a form called DHTML? Is this what I'd use? Or is the process of using VB to create webpages extremley difficult?
So to reiterate my question is how do you build webpages using VB, or which programs do you need to use??
VB App From A Webpage
Is there any way to call a vb application from a web page?
for instance if I click a button on the page, I want an app to open where I can print a report.
AS/400 Webpage
I'm looking for a way to get a website up that will mainly display records from an AS/400. I've been trying to use a program called ProGen WebSmart, but it's being a pain. Is there a Visual Studio 6.0 Pro solution? I know I could do these tasks in VB6 but the goal is to have this done from a webpage.
Any ideas/thoughts would be greatly welcomed! Thanks
Webpage
I wanna do this cheap.
I want to register www.forebringersofhope.com and have it forward to my att site. Is there a way I could do it for FREE. So that no service was involved? And if not, give me a address of a good free service for having a domain name. TY.
Get URL's From Webpage
How can I get urls from a webpage that's open in a form? Like, for example, there's 10 links on a page and I want the last nine of them. How would I get the URL's of those links and put them into an array?
Webpage
Is there a way to have a label open a webpage in a broswer?
Help! Is This Possible In A Webpage?
hey guyz,,, i want to know if it is possible to call a vb program from a webpage. and if so, how? can someone please tell me. thanks very much in advance!
.jpg On Webpage?HELP
what im tryin to do is there is a .jpg on a webpage and it says somethin what im tryin to do is extract whatever it says in the .jpg and insert it into a textbox or somesort? is this possible or anything easier?
VPN From A Webpage
I would like to be able to create a MS VPN connection for a client from a webpage. I am sure it should be rather easy to do, but I do not have the coding experience at this time. Any help would be great.
VPN From A Webpage
I would like to be able to create a MS VPN connection for a client from a webpage. I am sure it should be rather easy to do, but I do not have the coding experience at this time. Any help would be great.
Shell Loads App Into Processes And Not Desktop? ***Resolved***
Hello,
I am trying to shell notepad from my app (a service using ntService ocx).
It's telling me that it is loaded, however it is not being displayed on the desktop. I've checked the task manager and it's not there, but it is listed in the processes
Does anyone know why this is happening? Is there a better way of doing it? I've also tried using ShellExecute to no avail. Strangely it seems to work okay when I test the code outside of the service??
Here is a my code -
VB Code:
If Not modAppRunning.CheckForProcByExe(strAppName) Then ' Not found start it retVal = Shell(notepad.exe, vbNormalFocus) If retVal <> 0 Then MsgBox "Started by the Service (" & NTService.DisplayName & ")" Else MsgBox "Error With Launch!" End If Else MsgBox "Already Running" End If
Cheers Al
Form Loads Twice When I Load It With Forms.Add
I have a strange problem. One of my forms loads twice when loading it with the Forms.Add method, but if I use the {FormName}.Show method it only loads once. It seems to have something to do with the FileListBox being accessed. I have tested this and found that if I comment out the code that accesses the FileListBox the form will only load once as expected using the Forms.Add method.
I have included the project where it is repeatable everytime. Just run the project and you will see that the form frmCheckIn will load twice (you will need to move it to see the second one). All the othe forms load only once.
I used ******* to track the called events and if you look in the folder ******* log you will find a text file that has the tracking information. Search for frmCheckIn.frm.Form_Initialize and you will see that it will reload after the FileListBox Event (frmCheckIn.frm.File1_Click). Now if you comment out the code in the Event the form will only load once (you will need to close one frmCheckin form to rerun or more will open).
If you have trouble deciphering the RSTool trace log let me know...
Now if you close both frmCheckIn forms and use the menu to open the form it will only open once (Operations->Check In Files).
Getting HTML From A Webpage
After running several searches, and coming up with nothing but vague hints at the answer I need I'm just going to ask.
How do I get the HTML code form a webpage? Do I use WinSock?
Webpage Extract
I would like to be able to connect to a webpage and extract certain info from that page {example} goto weather.com and retrieve the current radar image and place it on my form in a picture or image box. How would i go about this once ive connected to there server, or can i> Thanks upfront for any advice.
Winsock On A Webpage
I am curious if i can use a winsock control of a webpage or a form on a webpage to make the page connect to a server somewhere. So i can make a chat on a webpage. Any advice or code or anything would be great.
Open Webpage
i simply want to hit a command button and have it open my default browser to the website www.anywebsitethatiwant.com
Connecting To A Webpage
I need to connect to a webpage, like www.po2.net/stats.php?id=$VBVARIABLE
without using the webcontrol, i dont want to use the webcontrol page cause when you navigate to a page, the mouse cursor turns into the hour glass.
i cant seem to get it to connect with winsock control, unless im using wrong port 1080?
how can i connect to a webserver
Using VB Code On A Webpage
Hi,
This is a question which has been irritating me for a long time...
I want to make an online VB project, one that has an HTML page and a .dll controller. How do you install it to webhosting? The package and deployment wizard does not seem to do it correctly and the dll does not function.
How can I get a VB app working on my site online using VB code??
Webpage Title
I am thinking of writing a program that will read a title of a (will run on remote machine) webpage and store the title in a file. My program will check the title every hour. The reason for this is, I have a PCanywhere on one machine (ISP using DHCP) so if I want to connect I need to know the public IP Address. If the last and current IP Addresses are differnet it will email me the new Public IP Address.
1. Is there a way to read the title of a webpage without bringing up the browser? If so what controls do I need to use?
2. Is there another way besides what I am thinking to receive the current Public IP Address
Thanks
Webpage Grab
hi
i was wondering if anyone can help me on getting a source to grab the source code of a webpage and be able to grab all words on the page between this <script>work here</script> thanks
|