mIRC Homepage
Posted By: FroggieDaFrog An overhaul of the Scripts editor - 16/04/10 03:24 AM
I'd like to see syntax highlighting for the script editor.

Make it user customizable to set what gets highlighted, what color & style it's highlighted, etc.
Posted By: Riamus2 Re: An overhaul of the Scripts editor - 16/04/10 11:26 AM
This has been suggested many times and I'm sure it is probably on Khaled's to-do list, but it is also probably low priority. Yes, that's a guess, but it's probably still true.

In the meantime, I believe argv0 made a DLL to do that and there may be a link somewhere on the forums. If it wasn't him, it was someone else here. As far as I know, he's still improving it, but it works.
Posted By: Wims Re: An overhaul of the Scripts editor - 16/04/10 12:36 PM
I started a new one with my friend because argv0 told me he wasn't working anymore on his dll, maybe he started again...
Avalaible here, but it can crash, and still need a lot of improvement, I also recommend to use it on 6.35 for now.

I support the suggestion anyways
Posted By: Riamus2 Re: An overhaul of the Scripts editor - 16/04/10 01:51 PM
Thanks, Wims. I didn't realize he had stopped working on his.
Posted By: argv0 Re: An overhaul of the Scripts editor - 17/04/10 09:41 PM
mEdit was really just an "alpha", though internally it was something more like a "prototype", just to see if it was possible.

The conclusion was that it is possible to extend mIRC in this way in a third party DLL-- but let me tell you from experience, it is not clean, maintainable, or efficient. Most of my time was spent hooking into the way mIRC interacted with Richedit20 (an older less powerful version of the control) and working around issues to get what I wanted. It was a huge hack all around. That's what made it so slow at handling large files, and there wasn't much that could be done.

The ideal solution here would be to have this supported natively, however I don't think Khaled should devote any of his time to this, as it's kind of orthogonal to building an IRC client. Building a script engine is one thing, since it directly affects your IRC experience-- building a syntax aware editor (customizable nonetheless) is completely different. This would mean in addition to supporting an IRC client, he would need to support what is essentially an IDE. Is all that necessary? We seem to be doing pretty well without it. And since mIRC has a very loose syntax to begin with, there's very little to actually highlight.

The more pragmatic solution is to do something in between the two extremes of mEdit and native syntax highlighting, namely: build your own editor and integrate it in mIRC. There are a few instances of mIRC-capable editors, and with little modification they could be setup to be loaded from mIRC and reload scripts when they exit, just like mIRC does. This would be "third party" but feel native to the user, and it wouldn't require Khaled's limited resources to implement. It would seem pretty feasible to do it this way, and IMO I'm not quite sure why nobody has, yet.
Posted By: Knoeki Re: An overhaul of the Scripts editor - 19/04/10 08:20 AM
The mIRC editor is cute, but it's not really suitable if you really want to write huge scripts. Why not just use some other editor? EditPlus has syntax hilighting for mIRCscript, and I'm sure you can let other editors do the same.

On top of that they allow you to use macros, change the indent size, autoindent, have multiple documents in tabs, etc.

For now, imho, the mIRC editor is unusable, mostly because I can't change it to show white text on black background, and also screws up my indenting (I tend to use 4 spaces, but as soon as I edit something with the mIRC editor, it immediately converts everything to 2 spaces, which is really annoying to put it mildly).

I also recall there being an actual stand-alone editor which had support for multiple documents, syntax hilighting, and it even had a fancy sidebar that listed all events/aliases in the current document. The downsides were that you could place your cursor anywhere, so if you clicked somewhere, that's where your cursor ended up, rather than at the actual end of the line as you'd expect, and the fact that you couldn't change something in the syntax hilight colours (afaik it was 'normal text' that was always forced to black). Can't recall what the name of this editor is, but I'm sure a bit of googling will reveal that.
© mIRC Discussion Forums