mIRC Homepage
Posted By: sparta @windows - 28/11/08 10:43 AM
I would like to see a way to use space in custom windows.

$w(@window name here) and it should create a custom window named

@window name here . now you need to use _ or - to get the space in the window name.
Posted By: Horstl Re: @windows - 28/11/08 03:12 PM
Hm, did you consider using one (or more) hard spaces [ $chr(160) ] in the window name?
Think about all the /window- /*line- /filter- /*buf- etc -commands, which would require a method of quoting the window name in their syntax, and it could break many existing scripts. smile
Posted By: RusselB Re: @windows - 28/11/08 04:26 PM
Did you consider putting quotes around the window name?
I can't test this at the moment, but it makes sense that it would work as I need to use "status window" when workign with that window (usually just hiding/showing it).
Posted By: Horstl Re: @windows - 28/11/08 04:37 PM
It's working different for custom windows - you can use /window -a "status window" but if you do /window "@status window", it will create "@status".
//window $+(@status,$chr(160),window) is fine of course.
Posted By: qwerty Re: @windows - 28/11/08 05:58 PM
Why would you want a window name with spaces? If by any chance you're thinking of the titlebar, you can always modify that with /titlebar @window text here.
Posted By: sparta Re: @windows - 28/11/08 09:07 PM
No, but when you as an example looking at your log files in a @ window, then if you want to name them. @Message_log and @Page_logs, would be nice to be able to use $w(@Message log) or what you would use for the "quotes". smile and was just a idea, i think it would be a nice feature to have and be able to use. smile
Posted By: Sephiroth_ Re: @windows - 30/11/08 10:18 AM
a hard space wouldn't fit to every font, on some fonts the hard space is chr(255)
Posted By: RoCk Re: @windows - 30/11/08 03:26 PM

Horstl: Possibly breaking scripts should never stand in the way of additions/improvements. I don't see how this would break scripts anyway.

qwerty: Why not have spaces supported in custom window names?
Posted By: starbucks_mafia Re: @windows - 30/11/08 04:19 PM
Code:
alias w return $replace($iif($isutf($1), $1, $utfencode($1)), $chr(32), $+($chr(194), $chr(160)))

That should replace spaces with non-breaking spaces encoded in UTF-8 which means they will always display as non-breaking spaces regardless of font or encoding settings.
Posted By: _Memo Re: @windows - 30/11/08 04:32 PM
Besides gain in aesthetics, this really seems like a pointless addition considering Khaled has begun revamping mIRC's internals a while back, and it's just going to take time for full string support. But that's for functionality sake..
Posted By: Horstl Re: @windows - 30/11/08 04:45 PM
Any script out there that handles "unknown" custom windows by their names may have troubles - because for many commands some "quoting" of window names with spaces is unavoidable, and these scripts lack it. Think of the analogical need of quotes in many commands to handle path-/filenames that contain spaces.
I do not run such a script on my own, yet I've seen scripts that for example do "show a sorted list for all (custom) windows (a table with infos and popups to change e.g. font sizes)"; "re-arrange and resize all visible windows (incl. custom ones) acc. to a specific pattern"; "quick hide / show all "desktoped" windows (including custom windows of course)"; "aline something to all windows that belong to a specific scon" ...

In my opinion, window names should conveniently (for practical reasons) remain limited to a non-spaced "string" of chars (like e.g. a hash table name). If you don't want to use hard spaces due to the fonts issue, a window's titlebar may always be manipulated via /titlebar, as qwerty pointed out.
Posted By: argv0 Re: @windows - 30/11/08 06:04 PM
Except that breaks Aero-glass so it's not an option for Vista users until Khaled fixes the utf-8 in titlebar bug.
© mIRC Discussion Forums