AMSWTimer Plugin

Description

AMSWTimer is an action plugin that you can create an unlimited timer.

Actions

Timer.Start
Timer.Stop
Callback_Function

Timer.Start(number Timer, number Delay, string Callback);

Description:

Create a timer.

Timer:

(number) Timer Number(unlimited from 0 to 65535).

Delay:

(number) The timer interval in Milisecond(every 1 Second = 1000 Milisecond) . note : Delay must > 0.

Callback:

(string) Name of Callback (a function) timer.

Returns:

(boolean) if timer successfully created return true else return false.

Example:

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");

Timer.Stop(number Timer);

Description:

Stop Timer.

Timer:

(number) Timer Number(unlimited from 0 to 65535). Note : if Timer = -1 then all of timer that created Stoped.

Returns:

Nothing.

Example:

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);

Callback_Function();

Description:

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 .

Example:

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");

Change Log

1.1.2.0

1.0.2.0

1.0.1.0

1.0.0.0

Additional Information

Author:

AMSWaves Corporation
support@AMSWaves.com

Copyright:

Plugin is copyright © 2008-2009 AMSWaves Design Corporation.

Website:

http://www.AMSWaves.com


Copyright © 2009 AMSWaves Design Corporation.
All Rights Reserved.