mIRC Homepage
Posted By: SaiyaJin Permanent Timer - 17/06/05 12:26 PM
Hi all,

Just a question on timers.

I run a simple timer from the Script Editor>Aliases screen. My simple timer is as follows:

/Timer1 /timer 0 1800 $!read(Timer1.txt)

When I want that timer to be enabled I just type in /timer1 in the window and it will type out that message in the .txt file

The problem I am having is that when my ADSL dissconnects I loose that particular timer that I have enabled.

Is there a way to always have that timer enabled when mIRC is open?

Thanks all.
Posted By: Collective Re: Permanent Timer - 17/06/05 12:55 PM
To have a timer enabled even when mIRC gets disconnected make it an offline timer using the -o switch. To make the timer continue even when the status window is closed use the -i switch (although note that this will make the timer's command operate on $activecid).

You can start the timer in an on START event to have it running whenever mIRC is open.
Posted By: DaveC Re: Permanent Timer - 17/06/05 01:46 PM
Im not telling you to change anything here, just a note of waring....

Not that it appears to be effecting you now, but timers are assigned numbers, and having an alias called timer1 may at some future time effect the operating of a timer.

ie: if i go
/timer 0 1 echo -s $time

i get
-
* Timer 1 halted
-
12:34:56
12:34:57
12:34:58 etc

to control that timer i can use
/TIMER1 -p
/TIMER1 -r
/TIMER1 off
pause/resume/off(delete)

if your alias exists it would call your alias instead and run your timer by mistake.

You could correct it by using

/STimer1 -o /timer 0 1800 $!read(Timer1.txt)

simply renaming the alias stimer1 nothing fancy smile
-o for offline timer, runs all the time!
Posted By: SaiyaJin Re: Permanent Timer - 18/06/05 12:04 PM
Thanks for the reply Collective and DaveC.

I added the -o so it loosk like:
/z1 /timer -o 0 6000 $!read(z1.txt)

and it looks like now the timer stays on even when dissconnected then being reconnected.

Thanks guys smile
© mIRC Discussion Forums