PerryL7 Posted July 23, 2007 Posted July 23, 2007 Hi there, I am wondering if there is anyway to test for a connection to the internet. I am working on a script, where if internet access is available, will go to a website, otherwise it will go to a FM layout. I know about "Get(SystemIPAddress)" but I am going to be on a LAN, so I would get a system address as long as I am connected to the router (not necessarily the internet). Does anyone have any ideas? Thank, PerryL7
John Mark Osborne Posted July 23, 2007 Posted July 23, 2007 I don't believe there is a Get function or error generated when there is no internet connection. However, you could use a Web Viewer object and the Set Web Viewer script step to test for an internet connection. Just create a web viewer, name it with Object Info and create a script that resets it to a web page that is very reliable. If there is no internet connection, the following formula will return an empty result: GetLayoutObjectAttribute("Web Viewer"; "content")
PerryL7 Posted July 24, 2007 Author Posted July 24, 2007 That worked perfectly for me. I had to add a delay to give it time to load but it works. Thanks for all of the help. -PerryL7
John Mark Osborne Posted July 25, 2007 Posted July 25, 2007 Yes, I had to add a Pause as well. If anyone else has a better solution than this crazy combination of features, please chime in.
Recommended Posts
This topic is 6332 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now