2
votes

i'm trying to use two timer function calls in the same event one after another as thus:

// set up attempt to login again
 Timer(ll_loginDelay(set to 10), this)


// informs server that user is logged in (i.e. does a 'ping')
 Timer(ll_pingRefresh(set to 30), iw_ping)

One attempts a retry for the login to a phone system and the one is used to refresh a report about who's logged in at any given time. If they are set to the same interval then they work, if not the second one doesn't. Any idea why?

Thanks,

tg

2
Where is this script? i.e. what is THIS? Knowing why, if it can be known, pretty much hinges on that. Also, in most cases, mentioning which PB version you're using can affect the accuracy of answers.Terry

2 Answers

0
votes

It's not entirely clear why you're getting this behaviour, but putting non-visual functionality like a ping in a non-visual object like a Timing object would not only be a better solution, but may also work around your problem.

Good luck,

Terry

0
votes

You can only have one timer for a particular window. Each time you call the timer event for that window you are in effect resetting the timer interval. It's hard to tell if you are using different windows looking at the code you've given.

A second thing to be aware of is that a window timer requires the window is open. This requirement seems obvious but Sybase made a point of mentioning it in the documentation so I figured I'd mention it too.

SyBooks Online documentation for PowerScript Timers in PB version 12.

SyBooks Online documentation Example of Non Visual Timing object.. This isn't the greatest example because it implies that the non-visual is some standard non-visual type of "timer" but I wasn't aware of a non-visual of that type. I think it is probably a plain old user defined non-visual, in either case this is another workaround/solution.

Good luck.