From WikiChip
Editing mirc/thread
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
This page supports semantic in-text annotations (e.g. "[[Is specified as::World Heritage Site]]") to build structured and queryable content provided by Semantic MediaWiki. For a comprehensive description on how to use annotations or the #ask parser function, please have a look at the getting started, in-text annotation, or inline queries help pages.
Latest revision | Your text | ||
Line 97: | Line 97: | ||
Consider this: | Consider this: | ||
− | + | on *:text:!mytrigger:#:{ | |
− | + | while (condition) { | |
− | + | dll whilefix.dll Whilefix | |
− | + | ;rest of your code here | |
− | + | } | |
− | } | + | } |
You are using whilefix because you are doing a loop that is processing a lot of things, or well, because the loop is long enough to freeze your mIRC. | You are using whilefix because you are doing a loop that is processing a lot of things, or well, because the loop is long enough to freeze your mIRC. | ||
What happens here is that whilefix calls the message loop, but from a critical event: socket messages are not processed, on text won't be processed again while your loop is running. | What happens here is that whilefix calls the message loop, but from a critical event: socket messages are not processed, on text won't be processed again while your loop is running. | ||
Line 109: | Line 109: | ||
If whilefix isn't much a problem given the nature of situation (you can't get critical event (or non critical event in this case) to be processed if you are in a while loop without whilefix), COM delaying scripts are more problematic: | If whilefix isn't much a problem given the nature of situation (you can't get critical event (or non critical event in this case) to be processed if you are in a while loop without whilefix), COM delaying scripts are more problematic: | ||
− | + | on *:text:!mytrigger:#:{ | |
− | + | ;something | |
− | + | pause 5 | |
− | + | ;rest of your code here | |
− | } | + | } |
If you do that, nested call to the message loop occurs and it's the same idea as above: your on text event is not processed until the pause finishes. | If you do that, nested call to the message loop occurs and it's the same idea as above: your on text event is not processed until the pause finishes. | ||
Line 121: | Line 121: | ||
That being said /timer are not handy, they make you lose the 'scope': | That being said /timer are not handy, they make you lose the 'scope': | ||
− | + | on *:text:!mytrigger:#:{ | |
− | + | noop | |
− | + | pause 5 | |
− | + | echo -a $nick | |
− | } | + | } |
vs | vs | ||
− | + | on *:text:!mytrigger:#:{ | |
− | + | noop | |
− | + | .timer 1 5 more | |
− | } | + | } |
− | alias more echo -a $nick | + | alias more echo -a $nick |
In the second example $nick simply does not have a value, mIRC left the on text event 5 seconds ago, $nick is meaningless, you have to pass $nick to the "more" alias, and timers are problematic that way, see the {{mIRC|msl_injection#The_.2Ftimer_command|injection}} page about timers. | In the second example $nick simply does not have a value, mIRC left the on text event 5 seconds ago, $nick is meaningless, you have to pass $nick to the "more" alias, and timers are problematic that way, see the {{mIRC|msl_injection#The_.2Ftimer_command|injection}} page about timers. |