mIRC Home    About    Download    Register    News    Help

Print Thread
#117431 15/04/05 11:13 PM
Joined: Jul 2004
Posts: 150
D
Debug Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Jul 2004
Posts: 150
Hi,

I would like to see something like this, to perform some commands in some time. Ex:

on *:time: if $time == 00:00:00 { echo -a Hello. This is a new day! Enjoy it}

Maybe this could be added, i like the idea.

Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
/timer has this. /help /timer


New username: hixxy
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
I can't say I'd like seeing that implemented in mIRC.

Use a timer. grin

/timerTime <time> 1 1 echo -a Hello. This is a new day! Enjoy it

Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Its got the advantage over a timer of that some other yahhoo script cant wipe it out by mistake.

but maybe
on *:TIME:hh:nn:ss:{ ... }

other wise its checking code once a second

Also means you could do
on *:TIME:*:00:00:{ echo -a Another hour of your life has been wasted on IRC, go do some yardwork you lazy !@#*($&#*($!)# }


* to all detractors please read line one smile

Joined: Apr 2004
Posts: 871
Sat Offline
Hoopy frood
Offline
Hoopy frood
Joined: Apr 2004
Posts: 871
Nice idea! IMO it'd be much neater than the <time> field to /timer, which often confuses people..

It would definitely need those matching fields for the time in order to be useful though.


Saturn, QuakeNet staff
Joined: Jul 2003
Posts: 77
B
Babel fish
Offline
Babel fish
B
Joined: Jul 2003
Posts: 77
i like it theres been several times that i could have used this...

though what about a pm/am slot or would 24 just be 12 am etc? how woudl that work i dont have a problem with a 24 hour system im just saying...

if this isnt implemented id like to at least see like a new version of a timer that can be started and instead of having to be checked every so often it would instead be called at a time like

/timer -someSwitch 12:30 0 somealias

i know this would be rather hard to implement since the existing timer takes advantage of WM_TIMER message that is built into windows but it woudl make so much code sooo much cleaner if there werent like 5 timers checking every second in 5 different addons....

just a thought


hmmm signed by me
Joined: Sep 2003
Posts: 4,230
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
I would stick with just 24 hour clock, its not hard for someone to add 12 to the hours if its pm, if it is then there scripts likely to fail every where else as well LOL

Quote:
/timer -someSwitch 12:30 0 somealias


3 ways i can see this.
(1) /timerXX 12:30 0 86400 somealias | /timerXX.oneoff 12:30 1 0 somealias
or
(2) /timerXX 12:30 1 0 somealias $(|,) timerXX 0 86400 somealias
or
(3) /timerXX 12:30 1 0 somealias somealias has this /timer command in it on the first line so sets it up again

* 3 is the most exact accurate but takes work on the alias to setup (or a wrapper alias which calls the real somealias thats needed and set the timer)
* 1 is what I use mostly

* if you watch the timers list when you have a /timerXX 12:30 1 0 echo its 12:30! wehn 12:30 hits it actually makes another timer /timerXX 1 0 echo its 12:30!

Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
There could even be another parameter in the event to tell mIRC the format you're using:

Code:
on *:time:$($+(HH,$chr(58),nn)):$($+(23,$chr(58),59)):{ ... }


If you're wondering why I used $(), $+() and $chr() remember that ':' means something in an event and it would probably take a fairly big change in the parser to support ':' in the on TIME event.


Link Copied to Clipboard