mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
Joined: Dec 2002
Posts: 580
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
This is part "bug" and part feature suggestion...

Consider this situation...
Code:
alias test {
  var %count 0
  while ($true) { inc %count | .signal test %count }
}
on *:signal:test:{ echo -a $signal $+ : $1 }

Run test for 30 seconds or so, and press ctrl-break to stop /test. Then the signals start coming, control-break will not clear the queue of pending signals. It would be nice if the queue would be cleared on ctrl-break. Anyone disagree?


NaquadaBomb
www.mirc-dll.com
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
I think it should clear signals, stop timers, the lot. Anything capable of triggering a script should be stopped. Maybe a new key shortcut would be needed though.

Joined: Dec 2002
Posts: 580
N
Fjord artisan
OP Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
Quote:
Maybe a new key shortcut would be needed though.


I think ctrl-break is treated special by the PC hardware, I think it has to do with interupts.


NaquadaBomb
www.mirc-dll.com
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
A small section in the options dialog could work too I suppose..

Code:
Actions to be performed when Ctrl+Break is hit:

+------------------+
| [ ] /timers off  |
| [ ] /remote off  |
| [ ] Stop signals |
+------------------+

Joined: Apr 2004
Posts: 871
Sat Offline
Hoopy frood
Offline
Hoopy frood
Joined: Apr 2004
Posts: 871
A good idea!

Implementation-wise though, I'd personally rather have ctrl+scrolllock do all that. In fact, ctrl+scrolllock could serve as an on/off switch for the script engine at all, something which I once heard it did but apparently doesn't. I'm not sure what it currently does in fact, but I am sure its behaviour can be extended.. smile I would hate to kill all timers in all my mIRC copies just because I press ctrl+break to break out of a loop in one of them, though.

Having to go to the options to specify what mIRC should do is not the best idea IMO. After all, you can only not change it when you need to.. smirk


Saturn, QuakeNet staff
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
I think this should be something other than Ctrl-Break. Ctrl-Break can be used outside of mIRC and it can still affect mIRC. This is useful when mIRC is minimized or in the tray and freezes in a broken loop. If you had to open mIRC before using Ctrl-Break, you'd have to kill the process to stop it. Because Ctrl-Break is global in nature, it works even though mIRC isn't the active application. If you set Ctrl-Break to stop timers and signals and whatever else, then no one could "safely" use Ctrl-Break for other purposes outside of mIRC because it would still be global and would remove things that you don't want removed in mIRC (such as timers and signals). As long as it's another combination, preferably one that isn't used by other apps or is set to only work when mIRC's the active application, it would be helpful.


Invision Support
#Invision on irc.irchighway.net
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
How about a [ ] Ask me option? That way you could choose what action to take each time you hit the key combo.

-genius_at_work

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
How will that work when mIRC's minimized or in the tray? Do you want mIRC's "Ask me" dialog popping up just because you use Ctrl-Break for some other reason? I think that's just going to cause headaches. Another key combination would be better, imo.


Invision Support
#Invision on irc.irchighway.net
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Agreed, I like the idea of Ctrl+ScrollLock.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
Ctrl+Break can continue to work as before, but the new ctrl+whatever should have the checkbox options that were mentioned above. Personally, I wouldn't necessarily want all my timers being stopped everytime.

-genius_at_work

Joined: Mar 2003
Posts: 612
B
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
I agree, I only want to break out of wahtever is hanging at that time, usually my own stupidly coded loop!

btk


billythekid
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Ok, that makes sense. It appeared that you were saying Ctrl-Break should have the Ask option.

There is just one issue with that. Unless you're using this alternate break method for anything EXCEPT breaking out of broken loops and other things that freeze mIRC, this ask option will not work. If mIRC's frozen from a loop, then it can't show and act on an Ask dialog. Of course, if you just are using it for other reasons and actually breaking out of loops is left to Ctrl-Break, then it's not an issue.


Invision Support
#Invision on irc.irchighway.net
Joined: Feb 2006
Posts: 65
F
Babel fish
Offline
Babel fish
F
Joined: Feb 2006
Posts: 65
if we do scrlk, how about pausing the timers, and un-pausing when u hit it again, any timers left over after the user looks thou the list and stops the one causing issues. i also noticed that control + break doesn't stop any $ident (like $findfile/$finddir or $dll) calls that where triggered with tab or //echo -a/-s so fixing that would also be nice

Last edited by FaiNT; 03/06/07 10:12 PM.

known on irc as MrStonedOne
read my full post before replying or dont reply. tl;dr isn't allowed here
Joined: Jan 2003
Posts: 1,063
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2003
Posts: 1,063
not all keyboards these days still have scrolllock... laptops for isntance don't. so it won't be a good shortcut to use. (and yes I feel the key should be there, I sometimes miss it when working under linux console).


If it ain't broken, don't fix it!
Joined: Mar 2006
Posts: 395
T
Pan-dimensional mouse
Offline
Pan-dimensional mouse
T
Joined: Mar 2006
Posts: 395
Originally Posted By: Doqnach
not all keyboards these days still have scrolllock... laptops for isntance don't. so it won't be a good shortcut to use. (and yes I feel the key should be there, I sometimes miss it when working under linux console).


My laptop does (function + home)


[02:16] * Titanic has quit IRC (Excess Flood)
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Originally Posted By: hixxy
A small section in the options dialog could work too I suppose..

Code:
Actions to be performed when Ctrl+Break is hit:

+------------------+
| [ ] /timers off  |
| [ ] /remote off  |
| [ ] Stop signals |
+------------------+


Why set remote off? i think it would be enough if ctrl-break should stop the running script, if it turn's remote off, then that mean all other scripts you running would be halted. Enough if the script cosing problem halts, so bether if it was a good error check instead.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
If the problem script is triggered by an event (onTEXT for example), the buggy code would be continuously called as people chat in your channel. In many channels, the chatter happens so fast that you would never have a chance to manually disable remotes or change the code.

-genius_at_work

Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Originally Posted By: genius_at_work
If the problem script is triggered by an event (onTEXT for example), the buggy code would be continuously called as people chat in your channel. In many channels, the chatter happens so fast that you would never have a chance to manually disable remotes or change the code.
-genius_at_work


I dont know how you use the CTRL break, i use it to halt the script, then i leav the server and try fix the problem, then i reconnect, no need to stay on a server with a faulty script, and if it's in a on text even, then you often flood your self off befor you pressed CTRL break, atlest i do smile


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
I have to agree that turning remotes off with Ctrl-Break is a bad idea. If it's another combination, that's okay. I hate when remotes get turned off because half of the time, just turning them back on isn't enough... I have to restart mIRC to reinitialize them again or various things seem to stop working properly. Ctrl-Break should be left as it is and any additional break options should be keyed to another key combination, such as Ctrl-Scroll Lock or something. Besides, Ctrl-Break is a global break command and I'd hate to see it work differently depending on the program I am in. I'd rather see it stay constant from program to program.


Invision Support
#Invision on irc.irchighway.net
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
The point is that if you are in a very active channel with an on TEXT script with an infinite loop in it, you may never get the chance to disconnect or do anything else because the script would constantly go into the infinite loop everytime someone spoke in the channel.

Obviously, the "disable remotes" option would be part of the alternate key-combo that was discussed above, rather than the current ctrl+break.

-genius_at_work

Page 1 of 2 1 2

Link Copied to Clipboard