mIRC Home    About    Download    Register    News    Help

Print Thread
#122926 17/06/05 12:26 PM
Joined: Jun 2005
Posts: 2
S
Bowl of petunias
OP Offline
Bowl of petunias
S
Joined: Jun 2005
Posts: 2
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.

#122927 17/06/05 12:55 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
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.

#122928 17/06/05 01:46 PM
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
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!

#122929 18/06/05 12:04 PM
Joined: Jun 2005
Posts: 2
S
Bowl of petunias
OP Offline
Bowl of petunias
S
Joined: Jun 2005
Posts: 2
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


Link Copied to Clipboard