AMSWTimer is an action plugin that you can create an unlimited timer.
Timer.Start
Timer.Stop
Callback_Function
Create a timer.
(number) Timer Number(unlimited from 0 to 65535).
(number) The timer interval in Milisecond(every 1 Second = 1000 Milisecond) . note : Delay must > 0.
(string) Name of Callback (a function) timer.
(boolean) if timer successfully created return true else return false.
a = 0
-- Callback function
function AMSWTimer_Callback()
Debug.ShowWindow(true)
a = a+1
Debug.Print("a = "..a.."\r\n")
end
-- Create Timer 1 with 1000 ms delay
Timer.Start(0, 1000, "AMSWTimer_Callback");
Stop Timer.
(number) Timer Number(unlimited from 0 to 65535). Note : if Timer = -1 then all of timer that created Stoped.
Nothing.
a = 0
-- Callback function
function AMSWTimer_Callback()
Debug.ShowWindow(true)
a = a+1
Debug.Print("a = "..a.."\r\n")
end
-- Create Timer 1 with 1000 ms delay
Timer.Start(0, 1000, "AMSWTimer_Callback");
Application.Sleep(10000)
Timer.Stop(0);
You must create a Callback function for every timer and send its name to plugin with 'Timer.Start' function then plugin call the callback in every twirl .
a = 0
b = 0
c = 0
d = 0
e = 0
Debug.ShowWindow(true)
-- Callback function 1
function AMSWTimer_Callback1()
a = a+1
Debug.Print("a = "..a.."\r\n")
end
-- Callback function 2
function AMSWTimer_Callback2()
b = b+1
Debug.Print("b = "..b.."\r\n")
end
-- Callback function 3
function AMSWTimer_Callback3()
c = c+1
Debug.Print("c = "..c.."\r\n")
end
-- Callback function 4
function AMSWTimer_Callback4()
d = d+1
Debug.Print("d = "..d.."\r\n")
end
-- Callback function 5
function AMSWTimer_Callback5()
e = e+1
Debug.Print("e = "..e.."\r\n")
end
-- Create timer 1 with 1000 milisecond delay
Timer.Start(0, 1000, "AMSWTimer_Callback1");
-- Create timer 2 with 1500 milisecond delay
Timer.Start(1, 1500, "AMSWTimer_Callback2");
-- Create timer 3 with 2000 milisecond delay
Timer.Start(2, 2000, "AMSWTimer_Callback3");
-- Create timer 4 with 2500 milisecond delay
Timer.Start(3, 2500, "AMSWTimer_Callback4");
-- Create timer 5 with 3000 milisecond delay
Timer.Start(4, 3000, "AMSWTimer_Callback5");
AMSWaves Corporation
support@AMSWaves.com
Plugin is copyright © 2008-2009 AMSWaves Design Corporation.
Copyright © 2009 AMSWaves Design Corporation.
All Rights Reserved.