Page 1 of 1

An alarm thingy

Posted: Fri Jun 05, 2009 3:04 pm
by Andycal
Just been playing with the 'Send' command to use in conjunction with my new Twitter app (thanks for all the help on that, found just the right code!).

So now I want to create a times tweets system. I was thinking of a file with times and events, comma seperated etc. but then I got stuck on the 'how do I get RunRev to actually read it and do something at a certain time'.

I've read up on the 'send' command and it seems to be in the right area so I can read the file work out the difference between the time it should trigger and the time now and go:

send "something" to me in xx minutes

But can I do this multiple times? Will it use up oodles of processor and more importantly, is there a better way of doing it?

Posted: Fri Jun 05, 2009 3:59 pm
by FourthWorld
You can do this safely by just checking to see if the message you're about to send is already in the pendingMessages:

Code: Select all

on HandleMessage
    DoSomethingInResponseToMessage
    if pMessage is not in the pendingMessages then
       send "HandleMessage" to me in 120 secs
    end if
end HandleMessage