mIRC Home    About    Download    Register    News    Help

Print Thread
#3542 26/12/02 01:58 PM
Joined: Dec 2002
Posts: 7
L
lrdv Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
L
Joined: Dec 2002
Posts: 7
I currently have multiple timers that post info into a channel throughout the day. I have looked in the mIRC help file and I can't understand how to have them perform the same timer on a daily basis without having to quit and restart the server.

Any help would be grealy appreciated.


#3543 26/12/02 02:11 PM
Joined: Dec 2002
Posts: 109
T
Vogon poet
Offline
Vogon poet
T
Joined: Dec 2002
Posts: 109
What do you mean ? Why would you quit/restart the server?


<Ingo> I can't uninstall it, there seems to be some kind of "Uninstall Shield"
#3544 26/12/02 02:44 PM
Joined: Dec 2002
Posts: 580
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
You really need to read "/help /timers" over again.. hehe...

Here is an example that may help you....
Code:
 
; Say something on every hour, but don't use 24 timers....
alias on-the-hour {
  var %NextHour $calc($asctime(hh) + 1)
  set %NextHour $iif(%NextHour &gt; 23, 00, %NextHour) $+ :00
  var %Repetitions 1
  var %Delay 0
  ; First run, or called by a timer?
  if ($ctimer != $null) { 
    ; Do something here
  }
  ; Start timer for next hour, make if an offline (-o) timer
  .timerOnTheHour -o %NextHour %Repetitions %Delay on-the-hour
}

Last edited by NaquadaServ; 26/12/02 03:32 PM.

NaquadaBomb
www.mirc-dll.com
#3545 26/12/02 03:38 PM
Joined: Dec 2002
Posts: 7
L
lrdv Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
L
Joined: Dec 2002
Posts: 7
Quote:
You really need to read "/help /timers" over again.. hehe...
yeah.. I have.. over and over and over smile

I have the following in my Options/Perform

/timer 7:30 1 1 /msg #options 4Stock & Option Market Open "Good Luck Fellow Traders"
/timer 13:45 1 1 /msg #options 4Last 15 mins of Trading
/timer 14:00 1 1 /msg #options 4Stock Market Closed "Afterhour Trading In Effect"
/timer 14:02 1 1 /msg #options 4Equity Option Market Closed
/timer 14:15 1 1 /msg #options 4Globex Market Closed
/timer 18:00 1 1 /msg #options 2After Hour Trading 4"Closed"

So I want to have the same thing posted every weekday. As it is now it posts once and halts and I have to quit and restart the server to re-activate the timer for the next day.


#3546 26/12/02 04:37 PM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
You might try setting the <repetitions> value to 0 (which means repeat indefinitely) and setting the <duration> value to 86400 (which is the number of seconds in 24 hours):
Code:

.timer 07:30 0 86400 msg #options 4Stock &amp; Option Market Open "Good Luck Fellow Traders"
.timer 13:45 0 86400 msg #options 4Last 15 mins of Trading
.timer 14:00 0 86400 msg #options 4Stock Market Closed "Afterhour Trading In Effect"
.timer 14:02 0 86400 msg #options 4Equity Option Market Closed
.timer 14:15 0 86400 msg #options 4Globex Market Closed
.timer 18:00 0 86400 msg #options 2After Hour Trading 4"Closed"



DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#3547 26/12/02 04:48 PM
Joined: Dec 2002
Posts: 145
G
Vogon poet
Offline
Vogon poet
G
Joined: Dec 2002
Posts: 145
Personnally I do not trust /timer to evaluate huge amount of seconds

I would go this way:

alias starttimerlist timer 00:00 1 1 starttimer

alias -l starttimer {
timer 1 120 starttimerlist
timerlist
}

alias -l timerlist {
timer 7:30 1 1 /msg #options 4Stock & Option Market Open "Good Luck Fellow Traders"
timer 13:45 1 1 /msg #options 4Last 15 mins of Trading
timer 14:00 1 1 /msg #options 4Stock Market Closed "Afterhour Trading In Effect"
timer 14:02 1 1 /msg #options 4Equity Option Market Closed
timer 14:15 1 1 /msg #options 4Globex Market Closed
timer 18:00 1 1 /msg #options 2After Hour Trading 4"Closed"
}

To start the process:
/starttimerlist

#3548 26/12/02 05:38 PM
Joined: Dec 2002
Posts: 7
L
lrdv Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
L
Joined: Dec 2002
Posts: 7
Quote:
Personnally I do not trust /timer to evaluate huge amount of seconds

I would go this way:

Thanks.. Were would I place this script? Perform or Alias?

#3549 26/12/02 05:51 PM
Joined: Dec 2002
Posts: 145
G
Vogon poet
Offline
Vogon poet
G
Joined: Dec 2002
Posts: 145
As is, it goes in a remote file

To put it in alias file, some modifications would be required.

starttimerlist timer 12:48 1 1 starttimer

starttimer {
timer 1 120 starttimerlist
timerlist
}

timerlist {
timer 7:30 1 1 /msg #options 4Stock & Option Market Open "Good Luck Fellow Traders"
timer 13:45 1 1 /msg #options 4Last 15 mins of Trading
timer 14:00 1 1 /msg #options 4Stock Market Closed "Afterhour Trading In Effect"
timer 14:02 1 1 /msg #options 4Equity Option Market Closed
timer 14:15 1 1 /msg #options 4Globex Market Closed
timer 18:00 1 1 /msg #options 2After Hour Trading 4"Closed"
}

#3550 26/12/02 10:30 PM
Joined: Dec 2002
Posts: 7
L
lrdv Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
L
Joined: Dec 2002
Posts: 7
Quote:
As is, it goes in a remote file

To put it in alias file, some modifications would be required.

Thanks for your help...

#3551 27/12/02 01:09 AM
Joined: Dec 2002
Posts: 145
G
Vogon poet
Offline
Vogon poet
G
Joined: Dec 2002
Posts: 145
You're welcome!

#3552 01/01/03 03:42 PM
Joined: Dec 2002
Posts: 7
L
lrdv Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
L
Joined: Dec 2002
Posts: 7
Quote:
As is, it goes in a remote file


Now that I got that part working I would like to expand this script to test for Week-Day and only post it during Monday - Friday.


#3553 01/01/03 05:38 PM
Joined: Dec 2002
Posts: 145
G
Vogon poet
Offline
Vogon poet
G
Joined: Dec 2002
Posts: 145
starttimer {
timer 1 120 starttimerlist
if (($asctime(dddd) == saturday) || ($asctime(dddd) == sunday)) return
timerlist
}

#3554 01/01/03 08:28 PM
Joined: Dec 2002
Posts: 7
L
lrdv Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
L
Joined: Dec 2002
Posts: 7
Thanks again and Happy Prosperous New Year to you. cool

#3555 01/01/03 09:06 PM
Joined: Dec 2002
Posts: 699
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 699
I think using $day would be better smile
if ($day isin Saturday Sunday) return


Link Copied to Clipboard