Announcement

Collapse
No announcement yet.

Timer

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

  • Timer

    I know the whole timer issue has been beaten up, but please take a look at this. I'm playing around with the winmm.dll hoping to maybe come up with a way to use it for a timer base. If someone who knows AMS better than I can come up with a way to check the variable without kidnapping the system, it could work.

    14126-timer.zip

  • #2
    Re: Timer

    AWESOME! I'll be keeping my eyes on this thread...

    Corey Milner
    Creative Director, Indigo Rose Software

    Comment


    • #3
      Re: Timer

      Will this still be depentent on the system speed to see how quickly it will retrieve the time? It is a while loop and you are accessing a .dll.

      Don't know myself, just asking.
      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


      • #4
        Re: Timer

        That was my thought also, Tigg.
        -
        = Derek
        ["All glory comes from daring to begin" - fortune cookie]

        Comment


        • #5
          Re: Timer

          The thing is that if you use a the loop, the interface is hijacked waiting for the loop to finish. That's what I'm asking... is there some event within AMS that fires often to use to check the variable?

          You can use it to time from one point to another. If you continue to click on the second text, the time increments but is not dependent upon the loop. It simply compares the start time to the time you click the text. This gives you an option to see how long it takes a user to do something from say page initialize to page jump.

          Comment


          • #6
            Re: Timer

            The mp3 player will do it - that fires every second. Adam did a sample GetTime that displayed the time. Should be here if yu search for it. In which case ... is the dll function needed? Dunno! havent looked into it.
            -
            = Derek
            ["All glory comes from daring to begin" - fortune cookie]

            Comment


            • #7
              Re: Timer

              Could you have a silent .mp3 to use for the timing function? Have it set to run for as long as you want the timer to run. Or run a little longer and just continue to get the time uptil when you want it to stop?

              That would still be dependant on a while loop though.

              How would this .dll call differ from a Get.System time? Does it all come from the same place?

              Would it differ from this post? click here
              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


              • #8
                Re: Timer

                A silent mp3 is what Adam did ... its been mentioned in a few posts by now. The crunch is trying to stay away from loops.
                Essentially, the CallDLLfunction is the same as Sys.GetTime .. its getting the time from the system. The original idea about the time [which is where Adam's mp3 timer came in] was just a way to show the time on a project, not just to run it for a set period of time. It seems the loops and glitches have come about since looking at a set period of time.
                In any case, Corey did an excellent Flash timer. Maybe we should stick with that for now. [img]/ubbthreads/images/icons/smile.gif[/img]
                -
                = Derek
                ["All glory comes from daring to begin" - fortune cookie]

                Comment


                • #9
                  Re: Timer

                  I don't know if this is new, but this is the easiest way to wait for a specified time:

                  %duration% = 300 //that's 5 minutes
                  %time% = System.GetDateTime ( "Time", "Military Time")
                  %st1% = String.GetDelimitedString ("%time%", ":", 0)
                  %st2% = String.GetDelimitedString ("%time%", ":", 1)
                  %st3% = String.GetDelimitedString ("%time%", ":", 2)
                  %wait% = Evaluate ((%st1% * 3600) + (%st2% * 60) + %st3%)
                  %wait1% = Evaluate ((%st1% * 3600) + (%st2% * 60) + %st3%+%duration%)
                  WHILE (%wait% < %wait1%)
                  %time% = System.GetDateTime ( "Time", "Military Time")
                  %st1% = String.GetDelimitedString ("%time%", ":", 0)
                  %st2% = String.GetDelimitedString ("%time%", ":", 1)
                  %st3% = String.GetDelimitedString ("%time%", ":", 2)
                  %wait% = Evaluate ((%st1% * 3600) + (%st2% * 60) + %st3%)
                  END WHILE

                  Comment


                  • #10
                    Re: Timer

                    if the timer should start when the ... window (page starts)
                    just do that:
                    d click (on the page)\Actions\

                    the event is:
                    On Show

                    add:
                    Sleep (#secs)
                    .....
                    ....
                    ..

                    (that was what i did need just a timer or somethings alike that opens another program after # secs and close AMS then)

                    Comment


                    • #11
                      Re: Timer

                      Sure, but if you WANT AMS to do something for just a specified amount of time than you can't use 'sleep'. Like showing a slideshow of jpgs or playing a flash animation (without tinkering with swf commands)

                      Comment

                      Working...
                      X