View Full Version : Check Connection: Website Updateable files??
Mitsukumi8
08-07-2009, 08:59 AM
I used to run a program I designed and stupidly did not save the original design file. I have no clue how to make this action work again.
I need to have the program once started check for an internet connection, and then project either an html file already loaded to the CD or go to project the html on the internet if the connection is true.
PLEASE HELP!!!!!! :huh
limboo
08-07-2009, 09:26 AM
this will work
result = HTTP.GetConnectionState();
if result.Connected == true then
--open web html
else
--open cd html
end
Mitsukumi8
08-07-2009, 11:02 AM
This is a great great help. My next question is what do I use for the script to substitute "--open web html" I use Web.LoadURL("Web1", http://www.yoursite.com"); and the browser within the application does NOTHING but refresh over and over and over, making it impossible to navigate the page... maybe Im using the wrong scrip!?? Thank you SO MUCH for your help!!!
limboo
08-07-2009, 11:19 AM
where is the script located?
i hope not on a the section "on timer" because then it will constantly refresh because you constantly give it the order to load.
i've included an .apz to show that it works fine for me.
and your welcome
Mitsukumi8
08-07-2009, 11:29 AM
Yeah so Im just an idot. I finally got it figured out, I was putting the script and action within the web object itself rather than the page script. The page script controlls the web object. Example:
result = HTTP.GetConnectionState();
if result.Connected == true then
Web.LoadURL("Web1", "http://www.yoursite.com");
else
Web.LoadURL("Web1", "AutoPlay\\Docs\\yourfile.htm");
end
This works PERFECTLY, with the internet connection issues. If there is no internet it will direct you to your on file htm
Thank you very very much for the help!!!!! It really helped alot and finally got it figured out!!
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.