mIRC Homepage
Posted By: Zaine Timer Script help - 11/11/07 02:28 AM
i am trying to do just a simple timer. i have read all through these forums and the internet and havnt found what im loking for.. i thouugh that this would work but it doesnt
Code:
/timerName 0 30 /msg $chan My message goes here.

anyone have any sugestions.. i am running mIRC 6.3 if thats needed to know.
Posted By: Bekar Re: Timer Script help - 11/11/07 02:42 AM
The $chan is the issue.

Depending on where you create the timer depends on whether $chan has any meaning.

Are you creating this in an event, or just from the edit box?

If it is just from a channel's edit box, use '//timerNa....' to force mIRC to evaluate the line.

If it's from an event, show us the event trigger, and we'll tell you more.
Posted By: Zaine Re: Timer Script help - 11/11/07 02:46 AM
there is no event.. its just a little message i want displayed every so often. so i put it in alias but everytime i try and start it it just tells me that the timer name is not active
Posted By: Lpfix5 Re: Timer Script help - 11/11/07 03:06 AM
You are using correct syntax except for $chan has $chan is not a valid command in a timer, you can use /timer 0 30 /msg $active msghere

but here's a small test

put this following script in your remotes Yes I know it doesnt have brackets ({}) or slashes (/)

alias test1 timer 0 30 msg $active success!

then once its in type /test1
Posted By: Bekar Re: Timer Script help - 11/11/07 03:23 AM
$chan can definately be valid for an 'timer'. It all depends on where it's called from.

If it's in an alias called from an event, then it will loose it's context, so won't be valid, but if it's just an alias called from the editbox from a channel window, it's all good.

Now, the error you were getting is interesting.

Using that exact line you gave us, it worked no issue for me while keeping a channel window active.

I'm going to assume that you change windows, to a query or custom or status window, then $chan will loose it's context, and thus will error when it tries to send the message.

The error message you gave us however is completely different. It means that the line you gave us here isn't what you're using.
Posted By: deegee Re: Timer Script help - 11/11/07 06:05 AM
You can't have an alias named timer(anything). /timer is a mirc command that is allowed to have text appended to it to give the timer a name. You can also use, for example /timername, to display the status of a timer named "name". That's where the "timer name is not active" message is from.

You need to add a name for your alias along the lines of...
Code:
mytimer timerName 0 30 msg $chan My message goes here.


($chan is valid in aliases called from events as well as from the commandline)

Posted By: Zaine Re: Timer Script help - 12/11/07 01:18 AM
oki got the bsic timer working, but what i need it to do is play it from a txt file.. i thought that it should look something like this...
Code:
alias timerName timer 0 30 /play text.txt #channel
Posted By: deegee Re: Timer Script help - 12/11/07 01:22 AM
That should work fine, what error are you getting?

Edit:
Really though you should check you're on that channel.
Code:
alias timerName timer 0 30 if ($me ison #channel) .play text.txt $v2
Posted By: Zaine Re: Timer Script help - 12/11/07 01:30 AM
* /play: cannot play to this window

there is the error im getting
Posted By: deegee Re: Timer Script help - 12/11/07 01:35 AM
You can't use it from status window, starting it in a channel window should work
Posted By: Zaine Re: Timer Script help - 12/11/07 01:46 AM
you can start it from the status window, i added that . at the begining of play so it looks like
Code:
.play
and it worked great.. thanks
Posted By: aceman Re: Timer Script help - 10/02/08 01:48 PM
Originally Posted By: Lpfix5
You are using correct syntax except for $chan has $chan is not a valid command in a timer, you can use /timer 0 30 /msg $active msghere

but here's a small test

put this following script in your remotes Yes I know it doesnt have brackets ({}) or slashes (/)

alias test1 timer 0 30 msg $active success!

then once its in type /test1


its working for me wink
© mIRC Discussion Forums