Timer Plugin Help

Timer Plugin

Welcome

Timer Object Plugin Help File

Plugin Name :

Timer

Current Version :

1.0.0.0

Last Update :

16/07/2008 (dd/mm/yyyy)

System Requirements :

Requires Win98 Or Above

Licence :

Freeware

Author :

Reteset

Web :

www.amsplugins.com

E-mail :

support@amsplugins.com

Copyright :

The Timer plugin is copyright © 2008 Reteset.

Copyright © 2008 Reteset.
All Rights Reserved.


Timer Plugin Help

Timer Plugin

How To Use

Usage Of Plugin

Design Time:

Usage Of This Plugin Is Simple Just Move An Instance From Tool Menu To Page
You Can Use Multiple Instances Within A Page, When You Move An Instance To Page
You Will See A Clock Icon On A Square, That's All, Please Do Not Resize The Object
You Can Place Object AnyWhere On Page
This Object Will Not Appear At RunTime And Will Not Affect Your Page Design

Run Time:

There Is No Known Limit About Number Of Timers But
This Plugin Tested With 500 Timers And All Timers Were Worked Fine
It Is Not Required To Destroy Existing Timers On Application Exit
Existing(Running) Timers Will Be Destroyed By Plugin Automatically On Application Exit

Others:

This Plugin Works Same As Standard Page Timer
On Multiple Pages Applications; When Page Navigated Object Destroys
All Running Timers Like Standard Page Timer(For Application Performance)
And Existing(Destroyed Before) Timers Should Be Restarted On Page Navigated Back ,If Necessary

Copyright © 2008 Reteset.
All Rights Reserved.


Timer Plugin Help

Timer Plugin

Events

Events

On Timer

Fires When A Timer Event Triggered.

e_TimerId:

(number) The Identifier Of Timer Which Fires This Event
This Value One Of Identifiers Which You Specified With TimerId.
When You Call Timer.StartTimer("TimerObj",100,250);

Example:

Page >> On Show :

Timer.StartTimer( "TimerObj",100,1000);

Timer.StartTimer( "TimerObj",101,1000);

Timer.StartTimer( "TimerObj",102,1000);

TimerObj >> On Timer :

if (e_TimerId == 100) then

    -- Event Fired From Timer With [TimerId = 100]

else if (e_TimerId == 101) then

    -- Event Fired From Timer With [TimerId = 101]

else if (e_TimerId == 102) then

    -- Event Fired From Timer With [TimerId = 102]

end end end

Copyright © 2008 Reteset.
All Rights Reserved.


Timer Plugin Help

Timer Plugin

Timer.StartTimer()

number Timer.StartTimer (string ObjectName,number TimerId , number Interval);

Description:

Creates A New Timer With Specified Id And Interval.

ObjectName:

(string) The name of the object that you want to apply this action to.

TimerId:

(number) A Unique Timer Identifier This Parameter Should Be A Number
Note :This Parameter Can Be A Number From -999999999 To 999999999 But Use Of A Negative Value
Is Not Recommended . Simply : You Can Use A Value From 1 To 999999999

Interval:

(number) Timer Interval In Milliseconds.

Returns:

(number) A Timer Handle That Created By System You Can Use This Value To Destroy This Timer.
If An Error Occurs, (zero)0 Will Be Returned

Return Value Usually Same As The Value That You Specified With TimerId

Remarks:

If There Is A Timer With The Value TimerId, Then
The Existing Timer Is Replaced By The New Timer.
When Timer.StartTimer() Replaces A Timer, The Timer Is Reset.

Example:

nTimer1 = Timer.StartTimer( "TimerObj",65535,250);

if (nTimer1 ~= 0) then

Dialog.Message( "Notice", "Success", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);

else

Dialog.Message( "Notice", "Error", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);

end

Error Codes

1100 - Could not find the specified plugin object or the plugin object is of the wrong type.

Copyright © 2008 Reteset.
All Rights Reserved.


Timer Plugin Help

Timer Plugin

Timer.StopTimer()

boolean Timer.StopTimer (string ObjectName,number TimerHandle);

Description:

Destroys An Existing Timer With Its Handle.

ObjectName:

(string) The name of the object that you want to apply this action to.

TimerHandle:

(number) Handle Of An Existing Timer (This Parameter Should Be Returned By Timer.StartTimer() )

Returns:

(boolean) Returns true On Succeed, false On Failure.

Example:

result = Timer.StopTimer( "TimerObj", timer1);

if (result) then

Dialog.Message( "Notice", "Success", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);

else

Dialog.Message( "Notice", "Error", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);

end

Error Codes

1100 - Could not find the specified plugin object or the plugin object is of the wrong type.

Copyright © 2008 Reteset.
All Rights Reserved.