mIRC Home    About    Download    Register    News    Help

Print Thread
#206896 28/11/08 10:43 AM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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.


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
sparta #206899 28/11/08 03:12 PM
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
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

sparta #206901 28/11/08 04:26 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
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).

RusselB #206902 28/11/08 04:37 PM
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
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.

sparta #206910 28/11/08 05:58 PM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
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.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
qwerty #206917 28/11/08 09:07 PM
Joined: Feb 2003
Posts: 3,432
S
sparta Offline OP
Hoopy frood
OP Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
Horstl #206964 30/11/08 10:18 AM
Joined: Oct 2003
Posts: 214
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 214
a hard space wouldn't fit to every font, on some fonts the hard space is chr(255)


one step closer to world domination
sparta #206973 30/11/08 03:26 PM
Joined: Dec 2002
Posts: 2,033
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,033

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?

Sephiroth_ #206976 30/11/08 04:19 PM
Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
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.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
RoCk #206978 30/11/08 04:32 PM
Joined: Sep 2008
Posts: 62
_
Babel fish
Offline
Babel fish
_
Joined: Sep 2008
Posts: 62
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..

RoCk #206980 30/11/08 04:45 PM
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
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.

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
Except that breaks Aero-glass so it's not an option for Vista users until Khaled fixes the utf-8 in titlebar bug.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"

Link Copied to Clipboard