$ctimer: Difference between revisions

From Scriptwiki
Jump to navigation Jump to search
Doomie (talk | contribs)
Timer Commands and Identifiers
Doomie (talk | contribs)
No edit summary
 
Line 3: Line 3:


== Example ==
== Example ==
  [[alias]] testctimer { [[echo]] -a $ [[DollarPlus|$+]] ctimer }
  [[alias]] testctimer { [[echo]] -a $ctimer }
  [[timer]]foobar 2 1 { testctimer }
  [[timer]]foobar 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.
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.  
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 Commands and Identifiers]]
[[Category:Timer Commands and Identifiers]]

Latest revision as of 12:30, 2 December 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. The second line makes a new timer called foobar, that will execute our just made alias testctimer 2 times with 1 second delay between.