Jump to content
Sign in to follow this  
PerryL7

Test Internet Connection

Recommended Posts

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

Share this post


Link to post
Share on other sites

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")

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.