|
Joined: Dec 2006
Posts: 80
Babel fish
|
OP
Babel fish
Joined: Dec 2006
Posts: 80 |
There are some messages that mIRC sends when an event from say a remote error takes place. Events such as trying to open a dialog (my mp3 player: /dialog -m mymp3 mymp3) that is already open would return this: * /dialog: 'mymp3' name in use Or there are always the code error messages: * /if: insufficient parameters (line 7, Input) Here is my question... I have everything in my mIRC scripted differently than default, so that joins, parts, quits, kicks, raws, etc... all return color coded display text of my preference. The beauty of mIRC is to be able to do this with most of the events, is there any way to alter the looks these types of error messages before they are returned, so that I can have them match the rest of my script events? Like an: on */ "if" error message: echo -a [colorcode] whatever i want it to look like goes here? Its kind of hard to ask this in a forum, ha, I cant find anything relating to this in the editor, so im not sure if its a question or a suggestion for improvement. I have had alot of friends ask me about this, so i thought i would come here and ask for some friendly feedback for all of us on the network  Thanks in advance, Scripto
Scripto ---- Life is about the relationships. The correct code being: $replace($them,$you,$me)
|
|
|
|
Joined: Aug 2004
Posts: 7,252
Hoopy frood
|
Hoopy frood
Joined: Aug 2004
Posts: 7,252 |
I think what you're looking for is the ON ERROR event.
/help on error
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
The on ERROR event is for capturing error messages sent by the server, it has nothing to do with errors in mIRC scripts.
There currently isn't any way to generically catch all mIRC scripting errors or otherwise change their appearance. Then again the errors that the OP has posted aren't ones that should ever be seen by the end-user of a script. Scripters should always check if ($dialog(dialogname)) before creating them and any syntax errors like the if one should, of course, be corrected.
For any other kind of errors that the scripter doesn't intend to fix unfortunately the only way to catch them currently is using the :error mechanism (see /help Error handling in mIRC).
Spelling mistakes, grammatical errors, and stupid comments are intentional.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Then again the errors that the OP has posted aren't ones that should ever be seen by the end-user of a script. True, but I think he's referring to theming mIRC. He wants it so that if someone is uses his themed mIRC and another script or command outputs an error like that, it will display it with the appropriate theme (colors/formatting) instead of the default way.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Dec 2006
Posts: 80
Babel fish
|
OP
Babel fish
Joined: Dec 2006
Posts: 80 |
Yes, Riamus2, i am looking for someway to code the default mIRC error messages called upon from a failure through a remote script. I listed a couple that I run into from time to time, such as trying to access a dialog that is currently open will return this message: * /dialog: 'mymp3' name in use There are many error messages or error events that can trigger a default echo message from mIRC as I posted above: * /if: insufficient parameters (line 7, Input) This is a default error message if a user writes a script and forgets a parameter, or missing ()'s or something. There are others, I have gotten them with incorrectly formatted /timer statements ranging through improper calls of custom aliases. Through my years of learning I have discovered these messages (dont we all?  ) but never knew of a way to re-code their looks to match the theme of my script. mIRC generally responds with this echo'd error message begining with an asterisk followed by the result of what error is being called. I wanted to know if there is a way to change the format of these messages so that I can make the echo statment to match the theme I use on the rest of the events, with like say, a time, followed by the fancy little color scheme of my choice etc. etc. Thanks for responding, And as a courtesy to anyone, i will help anyone I can with extreme patience. I am an advanced user, but please reserve my help to forums. I absolutely enjoy scripting Thanks in advance for the input  Scripto
Scripto ---- Life is about the relationships. The correct code being: $replace($them,$you,$me)
|
|
|
|
Joined: Jul 2003
Posts: 655
Fjord artisan
|
Fjord artisan
Joined: Jul 2003
Posts: 655 |
From a help/support point of view, i think allowing mircs internal default error messages to be changed (even halted completely) would make helping others with problems significantly more difficult.
"Allen is having a small problem and needs help adjusting his attitude" - Flutterby
|
|
|
|
Joined: Feb 2003
Posts: 810
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 810 |
What about having an errors window? An window where all error messages are allocated, with more detailed information, such as the calling aliases/events/timers/whatever related to the error.
With something like that, any script could simply hide it (eliminating the need to theme the error messages). Any user could then enter a command (like /errors or so) to visualize it when needed.
* cold edits his posts 24/7
|
|
|
|
Joined: Apr 2004
Posts: 759
Hoopy frood
|
Hoopy frood
Joined: Apr 2004
Posts: 759 |
I like it ! 
$maybe
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
That would be useful. Especially just having more detailed information.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Jul 2003
Posts: 655
Fjord artisan
|
Fjord artisan
Joined: Jul 2003
Posts: 655 |
An optional errors mdi somewhere sounds like a nice idea to me, in such a case an option like 'show errors in...' with dropdown 'Status or Active (or whatever it does now) only', 'error window only', 'both' or something to that extent should come with it.
My personal opinion is simply that there should not be a scriptable way to disable/change mirc internal error messages. Changing where they are shown is perfectly reasonable. If such a feature is implemented, i wouldn't see a problem with being able to capture (if it cant already be done) the messages to display them how you like, so long as they are still displayed in the unaltered form in the specified location (hidden mdi that open with /errors for example).
"Allen is having a small problem and needs help adjusting his attitude" - Flutterby
|
|
|
|
Joined: Feb 2003
Posts: 810
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 810 |
My personal opinion is simply that there should not be a scriptable way to disable/change mirc internal error messages. Changing where they are shown is perfectly reasonable. If such a feature is implemented, i wouldn't see a problem with being able to capture (if it cant already be done) the messages to display them how you like, so long as they are still displayed in the unaltered form in the specified location (hidden mdi that open with /errors for example). Yeah, I agree completely. That's what I thought about: guaranteeing the existence and precedence of mIRC's own error messages display, without sacrificing a scripter's will to theme mIRC. And, of course, having the error messages in a separate window opens room for more detailed information. Nice addition of yours... having an option like the "show errors in..." you explained would be definitely welcome.
* cold edits his posts 24/7
|
|
|
|
Joined: Dec 2006
Posts: 80
Babel fish
|
OP
Babel fish
Joined: Dec 2006
Posts: 80 |
I had a vision once of being able to not only change the theme, but by having access to said errors, or default messages, I could code notes reminding myself upon seeing a particular message, a list of possible "fixes", like I forgot to close a comparison in an "if" statement, or something along those lines. An overview being, every scripter has his own shortcomings. There are many default messages, both error and informational, that would be helpful to make 'self' key notes upon, for future reference. I dont think I had a strand of hair left in my head the very first year I was interested in script writing. Not only did I have to self teach the structure of the language, but also interpret where and how I made errors, through the default messaging. I became efficiant after time, and then quit writing for a year or two, only to walk back into a wall I had already climbed. Some notes passed onto me, pre-scripted, themed, and advanced to my understandings from my trial and error years would have been a wonderful re-discovery, to pick up and move forward with. In turn, being the idea behind this thread  Great ideas guys 
Scripto ---- Life is about the relationships. The correct code being: $replace($them,$you,$me)
|
|
|
|
Joined: Dec 2006
Posts: 80
Babel fish
|
OP
Babel fish
Joined: Dec 2006
Posts: 80 |
Or maybe instead of actual error messages, have it be an error number instead, that resorts to an additional mIRC help index. And you could use that number to trigger on your own code /and or help.files.txt Think of the possibilities
Scripto ---- Life is about the relationships. The correct code being: $replace($them,$you,$me)
|
|
|
|
|