Announcement

Collapse
No announcement yet.

How to import Clock data in a program

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

  • How to import Clock data in a program

    Guys, I recently started making programs with this software. I'd like to create a mini program that get Clock data from the PC. How can I do it?

  • #2
    You can use Page.StartTimer() to start a timer which fires each second (or a longer time, if you are not going to display the seconds). In the On Timer event script, get the current time with System.GetTime(), and then display the information according to your taste in a Label, Input, etc. object on the page. Check the examples for these actions I mentioned in the documentation for detailed information.

    Ulrich

    Comment


    • #3
      Originally posted by Ulrich View Post
      You can use Page.StartTimer() to start a timer which fires each second (or a longer time, if you are not going to display the seconds). In the On Timer event script, get the current time with System.GetTime(), and then display the information according to your taste in a Label, Input, etc. object on the page. Check the examples for these actions I mentioned in the documentation for detailed information.

      Ulrich
      Where can I check the documentation?

      Comment


      • #4
        Originally posted by Ulrich View Post
        You can use Page.StartTimer() to start a timer which fires each second (or a longer time, if you are not going to display the seconds). In the On Timer event script, get the current time with System.GetTime(), and then display the information according to your taste in a Label, Input, etc. object on the page. Check the examples for these actions I mentioned in the documentation for detailed information.

        Ulrich
        I'm so noob. How do I show information I got, in a Label?

        Comment


        • #5
          Try this..
          on Pageshow

          Page.StartTimer(1000, 1)

          ---insert a Label with name Time

          on Timer

          --put this

          if e_ID == 1 then

          time = System.GetTime(TIME_FMT_AMPM);
          Label.SetText(Time", time);

          end

          thanks

          Comment

          Working...
          X