mIRC Home    About    Download    Register    News    Help

Print Thread
#43545 22/08/03 10:11 AM
Joined: Dec 2002
Posts: 15
Pikka bird
OP Offline
Pikka bird
Joined: Dec 2002
Posts: 15
I have this timer:

timerwake -o 6:30 1 1 splay C:\cripta_D\mirc603\sounds\nightwish\wishmaster.mid

but if an input request is active by the time the timer should trigger nothing happens. please fix. I got late to work twice already :-P

#43546 22/08/03 10:16 AM
Joined: Jun 2003
Posts: 130
O
Vogon poet
Offline
Vogon poet
O
Joined: Jun 2003
Posts: 130
Buy an alarm clock smile
Maybe it did work but you were sound asleep?


If only women came with popup menus and online help.
#43547 22/08/03 11:10 AM
Joined: Jun 2003
Posts: 47
J
Ameglian cow
Offline
Ameglian cow
J
Joined: Jun 2003
Posts: 47
i try that kode.. and it works!!!

#43548 22/08/03 03:35 PM
Joined: Dec 2002
Posts: 15
Pikka bird
OP Offline
Pikka bird
Joined: Dec 2002
Posts: 15
weird... well, for some reason it's the second time the timer doesn't trigger. And I didn't fell asleep. The audio system connected to my PC can wake up the whole neighborhood and everything was set up quite loud

#43549 23/08/03 02:29 AM
Joined: Jun 2003
Posts: 130
O
Vogon poet
Offline
Vogon poet
O
Joined: Jun 2003
Posts: 130
I think its a bug try this:
//echo $$?="test" | timer 1 3 test
nothing happen when the input is open.


If only women came with popup menus and online help.
#43550 23/08/03 02:45 AM
Joined: Dec 2002
Posts: 191
N
Vogon poet
Offline
Vogon poet
N
Joined: Dec 2002
Posts: 191
How is that a bug as the timer doesn't start till the script finishes executing . while the dialog is open the script is halted.

#43551 23/08/03 03:03 AM
Joined: Jun 2003
Posts: 130
O
Vogon poet
Offline
Vogon poet
O
Joined: Jun 2003
Posts: 130
oh yeah my bad


If only women came with popup menus and online help.
#43552 24/08/03 05:31 PM
Joined: Dec 2002
Posts: 43
P
Ameglian cow
Offline
Ameglian cow
P
Joined: Dec 2002
Posts: 43
code works find for me.

Code:
timerwake -o 6:30 1 1 splay C:\cripta_D\mirc603\sounds\nightwish\wishmaster.mid


you are telling it to play the sound 1 second after 6:30 1 time. If you want it to play twice maybe try

Code:
timerwake -o 6:30 [color:red]2[/color] 1 splay C:\cripta_D\mirc603\sounds\nightwish\wishmaster.mid


I hope i didn'nt misunderstand the bug.

#43553 24/08/03 06:34 PM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
I don't know if I'd call this a bug, so much as "How mIRC Works."

Try this example, it should explain everything. (Type it in your status window)

//timerABC 1 1 echo -a ABC $!?!="erf?" | timerXYZ 1 2 echo -a XYZ

You will note that 2 timers are started at the same time. after one second, the first timer fires and a Yes/No prompt appears. one second later the second timer is suppose to fire but does not, because it's still waiting for you to select Yes/No.

It would appear that timer commands just have to wait for Input dialogs to go away before they can continue. This may be a bug, or an oversight, or by design... it's hard to tell.

Rule of thumb: Never allow an event to automatically display an Input dialog, especially if you are not around to take immediate action. Khaled put that warning message there for a reason, "$?: can't use in an event". You chose to disobey him by using a work-around. For this you must pay.

- Raccoon


Well. At least I won lunch.
Good philosophy, see good in bad, I like!
#43554 24/08/03 09:22 PM
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
mIRC script engine is single threaded ie. only one script can execute at time, so if input dialog is open one script is running, so the other can't start.


Code:
//if ( khaled isgod ) echo yes | else echo no
#43555 24/08/03 10:50 PM
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
Well, that is true, but it isn't exactly the case... at least, it's partially the case.

You'll note that other events and aliases trigger perfectly fine in the background while an input dialog is visible. Only timers are effected by this. The other timers still count down happily, but the commands get stacked up waiting to be released. The reason the timers are getting stacked up is because the $input dialog was called by a timer, and they share the same thread--so to speak.

Other events don't have this problem, all other scripts execute fine without being held up.



Well. At least I won lunch.
Good philosophy, see good in bad, I like!

Link Copied to Clipboard