Difference between revisions of "$ctimer"

From Scriptwiki
Jump to: navigation, search
 
(test TIMER)
Line 8: Line 8:
 
The second line makes a new timer called foobar, that will execute our just  made alias testctimer 2 times with 1 second delay between.
 
The second line makes a new timer called foobar, that will execute our just  made alias testctimer 2 times with 1 second delay between.
  
[[Category:Timer]]
+
[[Category:TIMER]]

Revision as of 14:28, 27 November 2005

Returns name of timer that triggered the current script.

$ctimer

Example

alias testctimer { echo -a $ $+ ctimer }
timerfoobar 2 1 { testctimer }

In the first line of this example, we make a new alias called testctimer. The only task of this alias is to echo $ctimer to the active window. We can't use $ctimer but have to use $ $+ ctimer because mIRC would evaluate $ctimer to $null and the alias would be echo -a only, which we don't want. The second line makes a new timer called foobar, that will execute our just made alias testctimer 2 times with 1 second delay between.