Snippets Project Page
Author: entropy
Added: 5y
Updated: 5y
mIRC: 7.52+
Hits: 1,456
Downloads: 17
Review: entropy
Size: 1.03KB
1 0
Login to vote.
mIRC Timer
v1.0
This snippet opens a dialog with a timer. Neat and small.
Download
JSON
▲ Review
▼ Source
; mIRC Timer v1.0 - by entropy 2017 menu status,channel,query,menubar { - Timer { time } - } alias time { dialog $iif($dialog(timer),-x,-md) timer timer } dialog timer { title "Timer" size -1 -1 196 44 option dbu notheme text "0secs", 3, 7 7 182 8 box "", 4, -4 19 201 50 button "Reset", 6, 116 27 37 12 button "OK", 5, 153 27 37 12, ok } on *:dialog:timer:init:0:{ %start = $ctime .timerupdate -o 0 1 update } on *:dialog:timer:close:0:{ .timerupdate off unset %start %to } on *:dialog:timer:sclick:6:{ %start = $ctime | did -ra timer 3 0 secs } alias -l update { if (!$dialog(timer)) { return } did -ra timer 3 $replace($duration($calc($ctime - %start)),wks,$+($chr(32),wks),wk,$+($chr(32),wk),days,$+($chr(32),days),day,$+($chr(32),day),hrs,$+($chr(32),hrs),hr,$+($chr(32),hr),mins,$+($chr(32),mins),min,$+($chr(32),min),secs,$+($chr(32),secs),sec,$+($chr(32),sec)) }
Changelog:
0
0