That's because mIRC first evaluates any identifiers or variables in a command, before executing it. Timer is no different.

In //.timer 0 3600 msg #sensei $read(babble.txt),

the $read is evaluated to a random line from babble.txt, and so that line will be msged every hour.

What you want is for the $read to be evaluated each time, with each call of the timer. Therefore, we musn't let mIRC evaluate our timer parameters when first starting it.

We do that by either doing $!identifier, or $($identifier,0) etc.

Examples: //.timer 0 3600 msg #sensei $!read(babble.txt,n)

Another way to go around this is by specifying an alias instead of the direct command

Example:

//.timermsgquote 0 3600 msgquote #sensei

alias msgquote {
if $me ison $1 { msg $1 $read(babble.txt,n) }
else .timermsgquote off
}

Btw, note how I added the n switch to the $read identifier, which will make the read-in text not evaluated, for example if identifiers, commands or variables are in the line that is read from the file.

Also, you ought to put that timer in the on join event with channel #sensei specified, instead of in the on start event. Because that way, you are sure that your message will arive.

Example:

on me:*:JOIN:#sensei: $+(.timermsgquote,#) 0 3600 msgquote #
on me:*:PART:#sensei: $+(.timermsgquote,#) off
[color:red]

alias msgquote msg $1 $read(babble.txt,n)
[/color]
There is also the case of incorporating multiserver commands, but I don't want to make this too complicated. This should certainly do for now.

Greets

Last edited by FiberOPtics; 07/01/05 04:54 AM.

Gone.