Announcement

Collapse
No announcement yet.

check connection-web counter

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

  • check connection-web counter

    Newbie question:
    I would like my application to establish if there is an internet connection (check connection) then actually have the user "ping" (with a web browser object I think as it seems the check connection action doesnt download the page)a web site so that it trips a visit counter set up on the page. Basically a web based odometer of how many times the application is accessed. I get very close but end up with error mssgs. Any help would be appreciated.

    tks,
    bjr

  • #2
    Re: check connection-web counter

    OK, what are the details of what have you done already and what are the details of the error message(s)?

    Corey Milner
    Creative Director, Indigo Rose Software

    Comment


    • #3
      Re: check connection-web counter

      I've literally tried every simple combination of check connection, show object, hide object. A simpe check connection action gets the job done, its just whenever I tried to hide the web browser, it wont hit the website, and whenever I unplug my internet cable- system freezes with the following mssg in the build attempt:
      >>Creating Runtime Engine...
      C:\WINDOWS\TEMP\ams4test.exe
      ERROR: Outputing runtime engine (#1)
      Cleaning up temporary build files

      Build failed.<<

      the idea is to ping a web site to activate the visit counter "if" a connection exists, otherwise do nothing and the user is not alerted that the application visited a web site.

      The following action seems to work (on page initialize) except if I am not connected?
      <IR_ACTIONS_LIST>
      <Action name="Check Connection">
      <Type>67</Type>
      <Function>0</Function>
      <DTIndentLevel>0</DTIndentLevel>
      <Enabled>1</Enabled>
      <ErrorHandling>
      <UserNotificationMode>2</UserNotificationMode>
      <CustomErrorMessage/>
      <OnErrorAction>0</OnErrorAction>
      <JumpToLabel/>
      </ErrorHandling>
      <Variable>%IsConnected%</Variable>
      <SiteToConnectTo>http://carta.mi-co.net/counter.php</SiteToConnectTo>
      </Action>
      <Action name="IF">
      <Type>200</Type>
      <Function>1</Function>
      <DTIndentLevel>0</DTIndentLevel>
      <Enabled>1</Enabled>
      <ErrorHandling>
      <UserNotificationMode>2</UserNotificationMode>
      <CustomErrorMessage/>
      <OnErrorAction>0</OnErrorAction>
      <JumpToLabel/>
      </ErrorHandling>
      <Condition>%IsConnected%</Condition>
      </Action>
      <Action name="END IF">
      <Type>201</Type>
      <Function>1</Function>
      <DTIndentLevel>0</DTIndentLevel>
      <Enabled>1</Enabled>
      <ErrorHandling>
      <UserNotificationMode>2</UserNotificationMode>
      <CustomErrorMessage/>
      <OnErrorAction>0</OnErrorAction>
      <JumpToLabel/>
      </ErrorHandling>
      </Action>
      </IR_ACTIONS_LIST>


      seems simple but tough to explain. I hope I am being clear enough

      tks for any help
      bjr

      Comment


      • #4
        Re: check connection-web counter

        I may be misunderstanding your question, however if your soul intension is to simply increment the web counter based on the URL loaded in the Web Browser Object, what if you created a Web Browser Object and resized it as small as it will go which will result in a small dot, then place it in the corner of your page. That way the user won't really know it is there and you'll get your counter if they are connected.

        Comment


        • #5
          Re: check connection-web counter

          'Tis a dang good idea.

          Corey Milner
          Creative Director, Indigo Rose Software

          Comment


          • #6
            Re: check connection-web counter

            Truly..........its not supposed to be that easy is it!

            Any ideas as to why I was getting that ams4.test runtime error when I unplugged my internet?

            Otherwise thanks for the help.
            bjr

            Comment


            • #7
              Re: check connection-web counter

              I'd have to ask about it back at the office, however if I'm not mistaken, unplugging the cable rather than closing the Internet connection properly will result in different behavior system wide and will often cause freezes in general when trying to access certain facilities.

              As I say, I'm not sure of the exact cause and routine that the build goes through, but I suspect that if you did close your Internet connection properly that problem would not occur.

              Comment


              • #8
                Re: check connection-web counter

                Thanks. I was concerned with whether the user was sitting on a plane (no cable) but I havent actually shut down the connection and rebooted without cable to test.

                I did remember why the simple web browser was not enough; it trips the counter everytime you access the web browser object autoplay page rather than the application. I will try a counter routine on the page itself.
                Love this program even though not a 'programmer'.

                bjr

                Comment


                • #9
                  Re: check connection-web counter

                  If you only want the coutner to be hit once every time the user loads the AutoPlay application -- instead of every time they view the page -- you could try hiding the web browser object on the page's On Open event.

                  Make sure you use an IF statement to make it only hide the object if it isn't the first time the page was opened, though...otherwise it will be hidden the first time the page is opened, too.

                  If hiding it doesn't work, then use the Web Browser Object - Navigate To action to direct the object at a different URL where there is no page counter.
                  --[[ Indigo Rose Software Developer ]]

                  Comment


                  • #10
                    Re: check connection-web counter

                    Thanks. I will try that method.
                    bjr

                    Comment


                    • #11
                      Re: check connection-web counter

                      Have you thought about submit to web action that would increment a PHP script counter?
                      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

                      Working...
                      X