mIRC Home    About    Download    Register    News    Help

Print Thread
#174865 13/04/07 06:29 PM
Joined: Oct 2006
Posts: 166
B
b1ink Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Oct 2006
Posts: 166
I would like to see the $strip identifier to start with the char $chr(15) which means any trailing color won't ruin the code.
Code:
//var %strip = 4text | echo -a %strip :: $strip(2text)

That's not a bug because the $strip procedure it to strip the text within the identifier. although I had to add $chr(3) or $chr(15) in the first position. but I would like the identifier to be leaded (starting) by $chr(15).


Kind Regards, blink
b1ink #174866 13/04/07 06:37 PM
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031
hmmm .. I would say that if this is a problem for you then
you should make it a habit to close your control codes same
as you close brackets { }

Code:
//var %strip = 4text | echo -a %strip :: $strip(2text)


Same as on these boards, you have to close your
color tags else everything following is effected.

RoCk #174869 13/04/07 07:14 PM
Joined: Oct 2006
Posts: 166
B
b1ink Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Oct 2006
Posts: 166
I'm sure of that. that's why I requested this addition. that doesn't mean I forgot to close the tag. but this could be useful for newbies and I came across it by mistake.


Kind Regards, blink
b1ink #174905 14/04/07 02:37 AM
Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
in fact, a change like that would prevent me to colour a previously stripped text on my own, wouldn't it?

Last edited by Horstl; 14/04/07 02:39 AM.
b1ink #175133 18/04/07 05:14 AM
Joined: Apr 2003
Posts: 342
M
Fjord artisan
Offline
Fjord artisan
M
Joined: Apr 2003
Posts: 342
Originally Posted By: b1ink
I would like to see the $strip identifier to start with the char $chr(15) which means any trailing color won't ruin the code.
Code:
//var %strip = 4text | echo -a %strip :: $strip(2text)

That's not a bug because the $strip procedure it to strip the text within the identifier. although I had to add $chr(3) or $chr(15) in the first position. but I would like the identifier to be leaded (starting) by $chr(15).


PLEASE DO NOT USE ACTUAL CONTROL CODES IN YOUR CODE!

Sorry but I have no idea what the  is. Use $chr(N) Please! Like $+($chr(03),4,text). Not 4text.

Anyhow... $chr(15) (which I will represent with ^o) is a control code. $strip purpose is to remove those. You want strip to ignore the formatting preceding it. It should NOT do that. That text appears BEFORE you call the identifer.

Bad bad idea. Use $+($chr(15),$strip(text)).


Beware of MeStinkBAD! He knows more than he actually does!
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
If a person is copy & pasting from code that they currently have in their remotes, it's a hassle to go through and manually change the symbol generated by Ctrl+K. Also, it's very easy to determine that the character is the one being generated by Ctrl+K, as opposed to Ctrl+U or Ctrl+B, as Ctrl+K is the only control character that uses a number afterwards.

I have never seen, before now, someone request that the control codes not be included in the code posted.


Joined: Jul 2003
Posts: 655
Fjord artisan
Offline
Fjord artisan
Joined: Jul 2003
Posts: 655
I think maybe they were saying that scripters should always use the chr references in their scripts, period. Which i personally think often makes mirc script harder to follow, and unless you have the chr references burned into memory, no easier to determine which it is than with the 'boxes'.

Regarding OP's original suggestion, i dont think its a good idea at all, this would cause more problems than solutions. For example the following would cancel the 7 unadvetantly

//var %x = 2some 3text | echo -a ::7 $strip(%x)


"Allen is having a small problem and needs help adjusting his attitude" - Flutterby
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
[quote=MeStinkBADPLEASE DO NOT USE ACTUAL CONTROL CODES IN YOUR CODE!
[/quote]

There isn't anything wrong with using them in code... on the forums or in your script.


Invision Support
#Invision on irc.irchighway.net
b1ink #175239 19/04/07 02:23 PM
Joined: Oct 2006
Posts: 166
B
b1ink Offline OP
Vogon poet
OP Offline
Vogon poet
B
Joined: Oct 2006
Posts: 166
I just realized that this addition sucks. never mind.


Kind Regards, blink

Link Copied to Clipboard