mIRC Home    About    Download    Register    News    Help

Topic Options
#31567 - 23/06/03 02:38 AM Remote Editor + Error handling handshaking
CloCkWeRX Offline
Fjord artisan

Registered: 18/02/03
Posts: 309
Loc: Adelaide, Australia
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)
_________________________
http://www.ahsonline.com.au/dod/FOAF.rdf

Top
#31568 - 24/06/03 12:44 AM Re: Remote Editor + Error handling handshaking
codemastr Offline
Hoopy frood

Registered: 12/12/02
Posts: 2809
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.

Top
#31569 - 24/06/03 01:04 AM Re: Remote Editor + Error handling handshaking
neophyte Offline
Fjord artisan

Registered: 12/04/03
Posts: 426
Loc: Australia
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)

Top
#31570 - 24/06/03 02:41 AM Curiousness
CloCkWeRX Offline
Fjord artisan

Registered: 18/02/03
Posts: 309
Loc: Adelaide, Australia
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.

_________________________
http://www.ahsonline.com.au/dod/FOAF.rdf

Top