0

Date Time RoMessage



What is the syntax for triggering the Msg port from a date/time event.

If we have;
buttonpress=CreateObject("roGpioControlPort")
p=CreateObject("roMessagePort")
buttonpress.SetPort(p)
msg=wait(0,p)

For a buttonpress,

How do we include a Date/Time triggered event with the
systemTime = CreateObject("roSystemTime")

2 comments

  • 0
    Avatar
    RokuLyndon


    Brian, take a look at the rotimer examples in the object reference. There are examples for having events trigger at specific dates and times, or very 30 seconds, for example.



    You use rosystem to get the local date time, and then you can create a timer object, and add tiem to it. So, if it's currently 9AM, you can add 30 minutes to the timer object, which is based ont he curren time, and then start the timer, and set the message port using the timer.



    Then, you listen for roTimer events. There are code examples in the object reference.
  • 0
    Avatar
    Brian2


    Thanks Lyndon,



    I have been digging around in the scripot referece manual for so long that I forgot all about the object reference manual.



    Cheers,
Please sign in to leave a comment.