I have a problem using timer to control
{eventA 2 minutes then eventB}
4minutes then
{eventA 2 minutes then eventB}
4minutes then
{eventA 2 minutes then eventB}
.....
I appreciate your help.
Printable View
I have a problem using timer to control
{eventA 2 minutes then eventB}
4minutes then
{eventA 2 minutes then eventB}
4minutes then
{eventA 2 minutes then eventB}
.....
I appreciate your help.
If you set the timer to 2 minutes initially (120 * 1000) then after event b set the value to 4 minutes and then loop.
loop
event a
timer1.interval = 120 * 1000
event b
timer1.interval = 240 * 1000
end loop
I haven't tried it but that should do the trick
By the way, the above code goes in the timer event function.
You can always use a variable and increase it each second.
and have a select case:
Example :
VB Code:
'Timer1 with interval 1000 Static mySecond as long mySecond = mySecond +1 Select case mySecond Case 120 Case 240 Case '... End Select
Daok