Announcement

Collapse
No announcement yet.

Check for internet connection.....

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Check for internet connection.....

    I'm having a hellof a time...can anyone spell out how to utilize the 'check internet connection'? Basically, if they click a button, it takes them to a website, if not, error box or message.

    I posted re: relearning how to use variables, but something is just *not* clicking. If I can follow by example or step by step, I can learn from that.

    God**** tactile learning :P

    Thanks!

  • #2
    Re: Check for internet connection.....

    In the help guide there is an example on Opening a webpage in the user's default browser. It is under Command Reference | Actions | Examples | Basic

    The actions are
    <font color=green>%IsConnected% = Internet.Check.Connection ("www.indigorose.com")

    IF (%IsConnected%)
    File.Open (open, "http://www.indigorose.com")
    ELSE
    File.Open (open, "%SrcDir%\\website\index.html")
    END IF
    </font color=green>

    In essence, the first check will return "TRUE" is there is an Internet connection and "FALSE" if it is not. The IF statement checks to see if the %IsConnected% is TRUE. IF (%IsConnected%) is the same as IF (%IsConnected% = TRUE). Then based on the value of %IsConnected% it will either open the webpage on the internet or off the CD.

    Hope that helps
    TJ-Tigger
    "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
    "Draco dormiens nunquam titillandus."
    Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

    Comment


    • #3
      Re: Check for internet connection.....

      OK, I cant even find an examples Tab under actions...and when I attempt to insert your code into an action box for the page (after I click IF, then BUILD, so I can type the whole expression) (on mouse click) I get an error message saying I have an invalid expression..

      to make this easier, I organized the pop up menus and did a screen capture....and it is attached.

      Thanks all, why im not grasping this, I have NO idea.

      13449-screencapture.gif

      Comment


      • #4
        Re: Check for internet connection.....

        That's wierd, when I try to use %IsConnected% with my modem unplugged it hangs my system...

        Corey Milner
        Creative Director, Indigo Rose Software

        Comment


        • #5
          Re: Check for internet connection.....

          Sorry, you don't want to type those into an expressions window. they are each individual lines. I have attached the actions in a zip file. Try these instead. Just unzip the xml file to your desktop and then import them into an actions list in AMS. That should do it.

          You will not see the Examples page unless you are running 4.0.0.2. They are part of the new help file.

          13465-Opening_a_web_page_in_the_user\'s_default_browser. zip
          TJ-Tigger
          "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
          "Draco dormiens nunquam titillandus."
          Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

          Comment


          • #6
            Re: Check for internet connection.....

            Wow, thanks for the file!

            The only problem is that I was hoping to learn how to do it within AMS, avoiding XML, so I could get used to the interface (see attachment to the post above)

            Thanks!

            Comment


            • #7
              Re: Check for internet connection.....

              You could always paste that in a 'new page' and use it as a guide to creating the 'real one' yourself. That way you get the best of both! [img]/ubbthreads/images/icons/smile.gif[/img]
              -
              = Derek
              ["All glory comes from daring to begin" - fortune cookie]

              Comment


              • #8
                Re: Check for internet connection.....

                What I do if I am trying to learn, is I will take what is there and try to duplicate it below the pasted examples. For example to do the check for internet connection do the following.

                Open the actions tab on the button/text you are using to do the check.

                Expand the Internet action and double click on Check Connection.

                In the dialog box leave the variable as %IsConnected% and change the Site to Connect to: to your site. then click OK

                13482-Image1.gif
                TJ-Tigger
                "A common mistake that people make when trying to design something completely foolproof was to underestimate the ingenuity of complete fools."
                "Draco dormiens nunquam titillandus."
                Map of IR Forum Users - IR Project CodeViewer - Online Help - TiggTV - QuizEngine

                Comment


                • #9
                  Re: Check for internet connection.....

                  i've got this command all working fine, but im just wondering.. is there a timeout function? like with running:
                  ping www.site.ext -w 100

                  would really help me allot.. [was?] making a program that relies on being able to connect.. ne-help? [img]/ubbthreads/images/icons/laugh.gif[/img]

                  Comment

                  Working...
                  X