mIRC Home    About    Download    Register    News    Help

Print Thread
Remote Editor + Error handling handshaking #31567 23/06/03 01:38 AM
Joined: Feb 2003
Posts: 309
C
CloCkWeRX Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Feb 2003
Posts: 309
First off I'd love to see errors be able to trace say the last 2-3 commands which called an alias from script:

* error: invalid parameters, /futon (line 7, file.mrc)
* callee: /myFutonCaller (line 8, file.mrc)
* callee: /myFutonCallerCaller (line 9, file.mrc)

etc... it'd be a mini stack trace kinda like java. I don't hold high hopes for that suggestioning going far, but it'd be a useful debutgging tool.


So would this:
hotlinked errors which jump to the error line in the script file - its already possible to do with mIRC's code, as you can jump to lines WITHIN the editor, and I'm sure that the hotlinks could be setup with an 'error' flag whcih does infact open the editor at line X

If we can't have that, perhaps access to displaying the editor and VERY rudimentary control (jump to line, find X in editor, save, etc)

Re: Remote Editor + Error handling handshaking #31568 23/06/03 11:44 PM
Joined: Dec 2002
Posts: 2,809
C
codemastr Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
Well the "hotlink jump to line" could already be done. Not saying it shouldn't be added, but you can do it with some scritping/dlls. You could setup a hotlink for something like:

*:*(line *, *)

That, to my knowledge would catch all mIRC errors that have a line number specified, and it really shouldn't catch too many false positives, unless people paste script errors in a channel, but you could work around that with a little more complex checking (perhaps some regex?). The hard part would be the jump to line #. But basically you'd need to use a dll that would get the handle of the editor window, then tell it to set it to jump to the specific line. The dll portion of it shouldn't be more than 10 lines of C code, and the mIRC script portion shouldn't be more than 5 lines of scripting. Like I said, not saying it shouldn't be internally added, just saying if you really want it, you can do it already.

Re: Remote Editor + Error handling handshaking #31569 24/06/03 12:04 AM
Joined: Apr 2003
Posts: 426
neophyte Offline
Fjord artisan
Offline
Fjord artisan
Joined: Apr 2003
Posts: 426
Sounds good.



But I think this would be far more useful:

* error - errortype, (called by $aliasname) - line X, script.mrc


Example:

* error - invalid if statement (called by "$clonescan") - line 15, clone.mrc


--------
mIRC - fun for all the family (except grandma and grandpa)
Curiousness #31570 24/06/03 01:41 AM
Joined: Feb 2003
Posts: 309
C
CloCkWeRX Offline OP
Fjord artisan
OP Offline
Fjord artisan
C
Joined: Feb 2003
Posts: 309
I'll be the first to admit that my C is nowhere near up to scratch

I was aware that you could do some manipulation of mIRC with DLLs but didn't think something like this was possible (as in my experience DLLs tend to focus on using hWnd to get stuff done)...

mIRC isn't com enabled which (while a lot of damn useless work) would be nice to play with - calling mIRC functions from script via COM objects could be handy, but also extremely dangerous.

I spose I could do this with IDEmIRC actually...

Isn't there a DLL to simulate keystrokes out there? brb scouting
ah hah. This is perfectly possible with sendkey.dll and the hotlinking.

WIR HABEN EIN SOLUTION!
Hurrah.