|
Joined: Jul 2003
Posts: 655
Fjord artisan
|
Fjord artisan
Joined: Jul 2003
Posts: 655 |
You would still not know where in the text the control codes were, so editing would be a pain, even if you think you cleared some control codes, it may just be that those left are not visible to you (control+o or a control+k before a space with a control+o after it).
The wysiwyg method works fine for word processors, but i have my doubts about its convenience and usefulness in a chat client like mirc.
"Allen is having a small problem and needs help adjusting his attitude" - Flutterby
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
When done programmatically, it's true that it might create a mess such as "^b^b^b" (instead of just "^b") - although there are ways to reduce this, and it would really only be a problem for large lines anyway. Even if the control codes are a mess, it doesn't really matter as long as they can be sent and viewed by other clients.
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
Formatting shouldn't be hidden from the scripter. It's simply a bad idea. Syntax highlighting which somehow differentiated each of the control codes so they could easily be told apart would be great, but WYSIWYG is something for end users, not people writing code.
Consider some simple situations:
echo -a $replace(04,) becomes: echo -a $replace(,)
echo -a 2hello, 1,0there becomes: echo -a hello, there as does: echo -a 2hello, 1there and: echo -a 2hello, there
var %warn = 04 | echo -a %warn $+ DANGER!: This isn't coloured properly! becomes: var %warn = | echo -a %warn $+ DANGER!: This isn't coloured properly!
There are obviously thousands of variations on these, but I think you get the picture. WYSIWYG doesn't work in code where the formatting could be coming from any number of places besides being literally inputted into the script, and can cause a lot of headaches for a scripter if he's getting a bug because of characters he can't even see.
Spelling mistakes, grammatical errors, and stupid comments are intentional.
|
|
|
|
Joined: Sep 2005
Posts: 2,881
Hoopy frood
|
Hoopy frood
Joined: Sep 2005
Posts: 2,881 |
In my head, the idea would be that you can select a bunch of text with your mouse to format it, but if you hit Ctrl+K/B/O/U you would still see the control code.
And I was also speaking only for the editbox, not the script editor. I don't think WYSIWYG has any place in a coding environment.
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
And I was also speaking only for the editbox, not the script editor. Yeah, looks like the whole conversation was about that. For some reason I got it into my head that this was about the script editor. Feel free to disregard my post.
Spelling mistakes, grammatical errors, and stupid comments are intentional.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Yeah, I think the editbox would be okay. I don't think we need the script editor to be WYSIWYG.
starbucks_mafia: In case you misunderstood my comment about syntax highlighting, I wasn't referring to control codes changing how the syntax looks. I was referring to making stuff like variable names be one color and channel names another and commands a third and so on.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Dec 2002
Posts: 2,962
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 2,962 |
Yeah I got what you meant about syntax highlighting (I assume you're probably talking as much about the script editor as I was). I'd like to see syntax highlighting in mIRC's script editor too, but in addition to the traditional highlighting (commands, identifiers, variables) I'd like to see the control codes highlighted differently. I don't mean highlighted based on what kind of formatting effect they have on the text but just highlighting the actual control code characters themselves so that it's easy to see whether you're looking at [Ctrl+K], [Ctrl+B], [Ctrl+R], or [Ctrl+O] instead of the current situation where you have to copy the character and go out of the editor to a mIRC editbox to test what it is.
Spelling mistakes, grammatical errors, and stupid comments are intentional.
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
just highlighting the actual control code characters themselves so that it's easy to see whether you're looking at [Ctrl+K], [Ctrl+B], [Ctrl+R], or [Ctrl+O] instead of the current situation where you have to copy the character and go out of the editor to a mIRC editbox to test what it is. Now *that* would be nice. Note that if I install the Asian language pack (code page), then the square boxes show up as "L"-shaped things that are rotated based on what control code you use. The only problem is that Ctrl-O happens to look like a space, which doesn't break a script that you already have, but does prevent you from putting Ctrl-O into a script. If that one code was changed, then it would be perfect.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Jan 2003
Posts: 1,063
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 1,063 |
also ctrl+u (underline) doesn't even appear at all when you have asian language support installed :-P
now with Vista coming it's an even bigger annoyance since that has this behavious by default from what I have heard and read
If it ain't broken, don't fix it!
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
Ah, maybe it was Ctrl-U and not Ctrl-O that was the "space" that I was talking about. I haven't used it for a long time because that was such a problem.
I think that if mIRC could change the Ctrl-U character so that it wasn't a space/blank in the Asian language codepage, then it would work out well. The problem with that is that, to do so, you'd have to change the $chr used for it and that would break scripts and wouldn't be compatible with other clients unless mIRC worked behind the scenes on it and just converted it for internal use. No idea... just commenting on the issue. Having the codes a different color or something would definitely help to make it easier to see the difference.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Apr 2003
Posts: 342
Fjord artisan
|
Fjord artisan
Joined: Apr 2003
Posts: 342 |
Control codes are not meant to be seen. They are used for some type of CONTROL (in this case how text is displayed). There should be identifiers for control codes. $bo = bold! $ul = underline! You get the idea I hope. Until then, I have my own identifiers for control codes... ;*** GLOBAL hadd chatFormatting
ALIAS BO { if $isid { if !$1- { return $chr(02) } | else { return $+($chr(02),$1-,$chr(02)) } | else { /BO $1- } } }
ALIAS UL { if $isid { return $chr(31) } | else { /UL $1- } }
ALIAS RV { if $isid { return $chr(22) } | else { /RV $1- } }
ALIAS O { if $isid { return $chr(15) } | else { /O $1- } }
ALIAS T { if $isid { return $chr(09) } | else { /T $1- } }
ALIAS S { if $isid { return $chr(32) } | else { /S $1- } }
ALIAS HS { if $isid { return $chr(160) } | else { /HS $1- } }
alias CO {
var %fg, %bg, %code
var %string7
if $isid {
if (!$len($1)) { return $chr(03) }
var %string = $1
if ($2 isnum) { %fg = $2 } | else { %fg = $null }
if ($3 isnum) { %bg = $3 } | else { %bg = $null }
if (%fg) && (%bg) { %code = %fg $+ , $+ %bg }
else if (%fg) { %code = %fg }
else { %code = $null }
if ($len(%string)) {
return $+($chr(03),%code,%string,$chr(03))
}
else { return $chr(03) }
}
else {
/CO $1-
}
}
Beware of MeStinkBAD! He knows more than he actually does!
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
I'd rather see them and have the use of a quick Ctrl-K# rather than trying to nest a lot of identifiers. I can just imagine what someone trying to make rainbow text would need to do and how confusing it would look (not that I like rainbow text, but it was an example). Obviously, you can script a loop to do it without the identifiers, but if you do, then you're still doing it the same way as it is already.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
Joined: Jul 2003
Posts: 655
Fjord artisan
|
Fjord artisan
Joined: Jul 2003
Posts: 655 |
Control codes are not meant to be seen. They are used for some type of CONTROL (in this case how text is displayed). I think you are over generalising and lumping mirc into the same catagory as instant messengers and word processor type programs. The only situation i can think of where your above identifiers would be of much use would be when storing information in an ini file.
"Allen is having a small problem and needs help adjusting his attitude" - Flutterby
|
|
|
|
Joined: Oct 2004
Posts: 8,330
Hoopy frood
|
Hoopy frood
Joined: Oct 2004
Posts: 8,330 |
The only situation i can think of where your above identifiers would be of much use would be when storing information in an ini file.
Which is when I use $replace and replace the stored control codes with something unique that can be stored so that I can read it back out later and replace it with the ctrl codes again.
Invision Support #Invision on irc.irchighway.net
|
|
|
|
|