mIRC Home    About    Download    Register    News    Help

Print Thread
Timer Script help #189695 11/11/07 02:28 AM
Joined: Mar 2007
Posts: 13
Z
Zaine Offline OP
Pikka bird
OP Offline
Pikka bird
Z
Joined: Mar 2007
Posts: 13
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.
Re: Timer Script help [Re: Zaine] #189697 11/11/07 02:42 AM
Joined: Dec 2002
Posts: 503
B
Bekar Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
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.

Re: Timer Script help [Re: Bekar] #189699 11/11/07 02:46 AM
Joined: Mar 2007
Posts: 13
Z
Zaine Offline OP
Pikka bird
OP Offline
Pikka bird
Z
Joined: Mar 2007
Posts: 13
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

Re: Timer Script help [Re: Zaine] #189701 11/11/07 03:06 AM
Joined: Aug 2005
Posts: 1,052
L
Lpfix5 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Aug 2005
Posts: 1,052
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


Code:
if $reality > $fiction { set %sanity Sane }
Else { echo -a *voices* }
Re: Timer Script help [Re: Lpfix5] #189703 11/11/07 03:23 AM
Joined: Dec 2002
Posts: 503
B
Bekar Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Dec 2002
Posts: 503
$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.

Re: Timer Script help [Re: Zaine] #189709 11/11/07 06:05 AM
Joined: Jun 2006
Posts: 508
D
deegee Offline
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2006
Posts: 508
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)


Re: Timer Script help [Re: deegee] #189802 12/11/07 01:18 AM
Joined: Mar 2007
Posts: 13
Z
Zaine Offline OP
Pikka bird
OP Offline
Pikka bird
Z
Joined: Mar 2007
Posts: 13
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

Re: Timer Script help [Re: Zaine] #189805 12/11/07 01:22 AM
Joined: Jun 2006
Posts: 508
D
deegee Offline
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2006
Posts: 508
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.
Re: Timer Script help [Re: deegee] #189807 12/11/07 01:30 AM
Joined: Mar 2007
Posts: 13
Z
Zaine Offline OP
Pikka bird
OP Offline
Pikka bird
Z
Joined: Mar 2007
Posts: 13
* /play: cannot play to this window

there is the error im getting

Re: Timer Script help [Re: Zaine] #189808 12/11/07 01:35 AM
Joined: Jun 2006
Posts: 508
D
deegee Offline
Fjord artisan
Offline
Fjord artisan
D
Joined: Jun 2006
Posts: 508
You can't use it from status window, starting it in a channel window should work

Re: Timer Script help [Re: deegee] #189810 12/11/07 01:46 AM
Joined: Mar 2007
Posts: 13
Z
Zaine Offline OP
Pikka bird
OP Offline
Pikka bird
Z
Joined: Mar 2007
Posts: 13
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

Re: Timer Script help [Re: Lpfix5] #194717 10/02/08 01:48 PM
Joined: May 2004
Posts: 4
A
aceman Offline
Self-satisified door
Offline
Self-satisified door
A
Joined: May 2004
Posts: 4
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