#141117 - 2005-06-06 11:49 PM
WEBPageLoaded()??????
|
sliver
Getting the hang of it
Registered: 2002-09-05
Posts: 94
|
I am trying to write some code that would detect if a particular web page is loaded or not. EX. - User tries to access www.mypage.com...the page is not available right away but code keeps looping to see if web page loaded yet. When web page finally loaded I am exiting application.
I looked all over the UDF section and came across WebSiteStatus UDF but I have had inconsistent results with that one (and that really just checks if you can get to the site...not if it's loaded in IE.)
Didn't know if anyone knew a better way to see if a web page was loaded on a users machine or not.
Thanks,
Note...I cannot use $createobject(InternetExplorer.application) and check the busy variable to do this....long story.
|
Top
|
|
|
|
#141119 - 2005-06-07 12:04 AM
Re: WEBPageLoaded()??????
|
sliver
Getting the hang of it
Registered: 2002-09-05
Posts: 94
|
I mean if the web page is currently open in the browser (it won't be open at first)....... Thats what I will keep checking for in my loop...just can't figure out a good way to do this.
EX. of what I'm doing...
Code:
While $form.visible $=Execute($form.doevents(1)) WebPageLoaded(www.mywebpage.com) Sleep 10 ? ? ? "Just Checked For it" Loop Quit 1
Not much of a script without the WebPageLoaded() UDF though
|
Top
|
|
|
|
#141121 - 2005-06-07 12:19 AM
Re: WEBPageLoaded()??????
|
sliver
Getting the hang of it
Registered: 2002-09-05
Posts: 94
|
I am worrying about the windows title changing though (I assume it gets that title through the HTML code) or not being the same in all regions (IE...othe countries). Do you know of any other way to do this??? I will test this out though...thanks
|
Top
|
|
|
|
#141124 - 2005-06-07 12:45 AM
Re: WEBPageLoaded()??????
|
sliver
Getting the hang of it
Registered: 2002-09-05
Posts: 94
|
I am not in control of the web page content...that was another worry I have.
The reason there will be a wait is because these users will be redirected to a hotel registration (pay site) first. After they register.... the original address I sent them too will be displayed at which point I want the program to close itself (when it actually gets to the original website).
|
Top
|
|
|
|
#141127 - 2005-06-07 02:54 AM
Re: WEBPageLoaded()??????
|
sliver
Getting the hang of it
Registered: 2002-09-05
Posts: 94
|
it will happen every time they are at a hotel and need to register....do you mean check for the cookie file and then delete it after the website is closed??? I guess I could do that as long as the cookie name stays the same.
|
Top
|
|
|
|
#141128 - 2005-06-07 02:55 AM
Re: WEBPageLoaded()??????
|
sliver
Getting the hang of it
Registered: 2002-09-05
Posts: 94
|
1) destroy the cached file 2) look for it's creation 3) once created, try to delete it 4) when delete is possible, the page has loaded
Do you mean the temp file that is created???
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 229 anonymous users online.
|
|
|