Hi.
While I was playing/working on the mother of all scripts
for handling actions based on events, I realized how powerful OnPeriodicTimer()
is.
One thing that would improve it is the ability to set a timer but for a specific date/time. For example, this could help if I want to schedule files upload every day at 8 PM.
Right now, it’s possible, but you have to calculate the time remaining for the next timer, then the one after that, and so on. Being able to just set a date and time would make things so much easier!
Thanks!
What if we extended the Date object to give it a helper which returns the number of milliseconds from one date to another? (And maybe other units, but ms is the one you'd want for a timer.) Would that solve things?
That could be useful for other things, and might also simplify the situation where a script needs to be woken up at several different times and needs to work out which one is the soonest to set the timer.
Yes, that could work too, of course!
The main issue I can think of with that approach, is that you'd still have to recalculate the timer each time, which could be a bit of a hassle when you've got several of them (you'd have to rely on persistent vars o something for each timer to 'remember' the date/time that was set, etc).
OnDateTime() recieves event set by DOpus.SetDateTime(id, date, time);
sounds much easier to me, not sure if it would be more problematic to implement.
We'll add an OnScheduledTimer event in 13.11.1.
That's great!
At this point it is clear that you guys have a first class treatment and attention to your users, thanks!
A labour of love methinks, and as such and totally relavant to this new awesome feature, this would be useful in the dialog editor please,
VB.Net - DateTimePicker Control
If you post that as a new thread we'll consider it