mIRC Home    About    Download    Register    News    Help

Print Thread
#189695 11/11/07 02:28 AM
Z
Zaine
Zaine
Z
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.

Last edited by Zaine; 11/11/07 02:28 AM.
#189697 11/11/07 02:42 AM
B
Bekar
Bekar
B
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.

#189699 11/11/07 02:46 AM
Z
Zaine
Zaine
Z
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

#189701 11/11/07 03:06 AM
L
Lpfix5
Lpfix5
L
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

#189703 11/11/07 03:23 AM
B
Bekar
Bekar
B
$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.

#189709 11/11/07 06:05 AM
D
deegee
deegee
D
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)


#189802 12/11/07 01:18 AM
Z
Zaine
Zaine
Z
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

#189805 12/11/07 01:22 AM
D
deegee
deegee
D
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

Last edited by deegee; 12/11/07 01:31 AM.
#189807 12/11/07 01:30 AM
Z
Zaine
Zaine
Z
* /play: cannot play to this window

there is the error im getting

#189808 12/11/07 01:35 AM
D
deegee
deegee
D
You can't use it from status window, starting it in a channel window should work

#189810 12/11/07 01:46 AM
Z
Zaine
Zaine
Z
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

#194717 10/02/08 01:48 PM
A
aceman
aceman
A
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


Link Copied to Clipboard