From WikiChip
Editing mirc/commands/timer
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
This page supports semantic in-text annotations (e.g. "[[Is specified as::World Heritage Site]]") to build structured and queryable content provided by Semantic MediaWiki. For a comprehensive description on how to use annotations or the #ask parser function, please have a look at the getting started, in-text annotation, or inline queries help pages.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | + | The '''/timer command''' can be used to create a general purpose timer. A [[timer]] is a way to execute code at some specific interval or time and delay. [[Timers]] can be named and unnamed. Unnamed timers will get the lowest numeric timer index available. Named timers are specifically useful if you need to recall that timer at a later period - to pause it, resume it, or simply reset it. Starting a timer with a name that already exists will override the old timer. Timers only get execute on the main mIRC message loop. I.E. after the alias/event are complete. | |
− | The '''/timer command''' can be used to create a general purpose timer. A timer is a way to execute code at some specific interval or time and delay. Timers can be named and unnamed. Unnamed timers will get the lowest numeric timer index available. Named timers are specifically useful if you need to recall that timer at a later period - to pause it, resume it, or simply reset it. Starting a timer with a name that already exists will override the old timer. Timers | ||
− | only get | ||
== Synopsis == | == Synopsis == | ||
/timers [off] | /timers [off] | ||
/timer[n|name] [off] | /timer[n|name] [off] | ||
− | /timer[n|name] [- | + | /timer[n|name] [-cdeomhipr] [time] <repetitions> <interval> <nowiki><code></nowiki> |
== Switches == | == Switches == | ||
Line 12: | Line 10: | ||
* '''-o''' - Creates a offline timer | * '''-o''' - Creates a offline timer | ||
* '''-c''' - Creates a catch-up timer | * '''-c''' - Creates a catch-up timer | ||
− | * '''-h''' - Creates a high-resolution timer | + | * '''-h''' - Creates a high-resolution timer |
Attributes | Attributes | ||
Line 20: | Line 18: | ||
Manipulator | Manipulator | ||
− | * '''-e''' - Executes the code associated with a timer | + | * '''-e''' - Executes the code associated with a timer |
− | * '''-p''' - Pauses a timer | + | * '''-p''' - Pauses a timer |
− | + | * '''-r''' - Resumes a timer | |
− | * '''-r''' - Resumes a timer | ||
− | |||
== Parameters == | == Parameters == | ||
Line 30: | Line 26: | ||
* '''[n|name]''' - The name or index of the timer | * '''[n|name]''' - The name or index of the timer | ||
* '''[time]''' - Time to activate the timer, for example '15:30' for 3:30PM | * '''[time]''' - Time to activate the timer, for example '15:30' for 3:30PM | ||
− | * '''<repetitions>''' - The amount of | + | * '''<repetitions>''' - The amount of timer the timers should repeat itself. An repetition value of '0' will repeat for ever. |
* '''<interval>''' - The delay between two consecutive timer executions | * '''<interval>''' - The delay between two consecutive timer executions | ||
* '''<nowiki><code></nowiki>''' - Code to be executed. | * '''<nowiki><code></nowiki>''' - Code to be executed. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Example == | == Example == | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Below is a simple count down timer that uses a call-back alias once per second: | Below is a simple count down timer that uses a call-back alias once per second: | ||
Line 104: | Line 63: | ||
}</syntaxhighlight> | }</syntaxhighlight> | ||
− | A repetition of '0' can also be used to mean an repeat | + | A repetition of '0' can also be used to mean an repeat for ever: |
<syntaxhighlight lang="mIRC">alias cur_time { | <syntaxhighlight lang="mIRC">alias cur_time { | ||
Line 110: | Line 69: | ||
}</syntaxhighlight> | }</syntaxhighlight> | ||
− | + | == Compatibility == | |
− | + | Added: mIRC 3.3, 3.4 | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Added On: 21/06/95 | |
− | |||
− | |||
− | |||
− | + | <small>Note: Individual switches were not taken into consideration.</small> | |
− | |||
== See also == | == See also == | ||
Line 137: | Line 81: | ||
* {{mIRC|$timer}} | * {{mIRC|$timer}} | ||
* {{mIRC|$ctimer}} | * {{mIRC|$ctimer}} | ||
− | |||
* {{mIRC|$time}} | * {{mIRC|$time}} | ||
* {{mIRC|$date}} | * {{mIRC|$date}} | ||
Line 146: | Line 89: | ||
{{mIRC command list}} | {{mIRC command list}} | ||
− | [[Category: | + | [[Category:MIRC commands]] |