mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Aug 2004
Posts: 3
H
Hampus Offline OP
Self-satisified door
OP Offline
Self-satisified door
H
Joined: Aug 2004
Posts: 3
I'm having a hard time getting the following timer to work:

//timer $+ %timernr 1 %time //writeini filename.ini %id %res 1 | //writeini filename.ini %id status 0

It's the two seperate commands that mIRC doesn't seem to handle very well. It executes the first command "//writeini filename.ini %id %res 1" beautifully when the timer expires, but the part after the "|" gets executed right away.

I know that having two timers would be a solution, but I'm keeping that as a last resort.

Can anyone help me out here?

Joined: Feb 2003
Posts: 67
N
Naz Offline
Babel fish
Offline
Babel fish
N
Joined: Feb 2003
Posts: 67
Put your two commands in an alias then have the timer call the alias.

//timer $+ %timernr 1 1 writestuff

alias writestuff {
writeini filename.ini %id %res 1
writeini filename.ini %id status 0
}

%timernr would become part of the timers name with the $+ there, so I added an extra '1' in there.


Those who live by the sword get shot by those who don't.
Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
Alternatively, change the | to $chr(124) (the ascii value of it).

//timer $+ %timernr 1 %time //writeini filename.ini %id %res 1 $chr(124) //writeini filename.ini %id status 0

Eamonn.


Joined: Aug 2004
Posts: 3
H
Hampus Offline OP
Self-satisified door
OP Offline
Self-satisified door
H
Joined: Aug 2004
Posts: 3
I've tried that solution as well... And yes.. %timernr would become a part of the timers name. U've missed the %time variable, in which case the extra 1 U've added becomes unnecessary smile

But here's why the solution doesn't work. (I probably should have been more specific when I first posted this problem and for that I apologize)

The timer is triggered by user1 which stores his "numbers" in the variables and then the timer starts.
But before the timer runs out, user2 triggers the timer, and then the numbers stored in the variables by user 1 will be overwritten.

I could of cause create a unique var for each user, but that will leave a giant mess as the number of users start to rise.

Joined: Aug 2004
Posts: 3
H
Hampus Offline OP
Self-satisified door
OP Offline
Self-satisified door
H
Joined: Aug 2004
Posts: 3
Ok.. Coolkill... U're a lifesaver.

It works perfectly.. Thx a bunch smile

Joined: Dec 2002
Posts: 788
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 788
Your Welcome smile


Link Copied to Clipboard