Request for an example script with procedure StartTimer

Can someone post an example code with both

StartTimer(const TimerName: String; const Interval: Cardinal);


OnTimer (TimerName: String): Boolean;

All my efforts went futile.

Some example code will be very helpful.

For instance, paste this code in UserMain script:

procedure Click;
StartTimer("tic1", 1000); 

function OnTimer (TimerName: String): Boolean;
// Do something
Result := False;

MessageBox(“This is a simple message.”, “First Demo”, MB_OK+MB_ICONINFORMATION);

I placed this in place of the // Do something;

Still this is not working.
How can I check whether this OnTimer is called

How did you call the procedure (in my sample procedure Click;) to launch the timer?