mIRC Home    About    Download    Register    News    Help

Page 2 of 2 < 1 2
Topic Options
#216889 - 06/12/09 11:39 AM Re: if ($1 ischar) { echo Yes it is! } [Re: westor]
Tomao Offline
Hoopy frood

Registered: 07/07/07
Posts: 1129
Loc: United States
I think he is asking for an ascii character operator for evaluation purposes. I'm sure you can use regex along with a custom $ischar identifier for that matter:
Code:
alias -l ischar if ($regex($1-,/(\W+)/S)) return $regml(1) 
on *:TEXT:*:?:if ($ischar($1-)) echo -s WARNING: $nick just used $+(",$v1,") in private.
P.S. I know using an alias is unnecessary, but since westor's brought the $v1 up...I thought it'd be for the best.

Top
#216890 - 06/12/09 12:32 PM Re: if ($1 ischar) { echo Yes it is! } [Re: argv0]
westor Offline
Hoopy frood

Registered: 27/12/08
Posts: 1511
Loc: Greece
The Riammus has understand what i mean, I gave you examples but i have not more examples, anyway!
_________________________
Need Online mIRC help or an mIRC Scripting Freelancer? -> http://westor.ucoz.com/contact <-

Top
#216893 - 06/12/09 02:13 PM Re: if ($1 ischar) { echo Yes it is! } [Re: Tomao]
5618 Offline
Hoopy frood

Registered: 18/06/07
Posts: 933
\W? So basically...
Code:
if ($1- !isalnum)

...except that \W also includes the _ character.

Top
#216902 - 06/12/09 03:45 PM Re: if ($1 ischar) { echo Yes it is! } [Re: 5618]
Zed Offline
Babel fish

Registered: 18/03/04
Posts: 54
Loc: Belgium
Code:
if ($len($1-) == 1) && ($1- isalnum) { }

or

if (? iswm $1-) && ($1- isalnum) { }

Top
#216904 - 06/12/09 03:55 PM Re: if ($1 ischar) { echo Yes it is! } [Re: westor]
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8327
Loc: NC, USA
Originally Posted By: westor
The Riammus has understand what i mean, I gave you examples but i have not more examples, anyway!


Everything I put in that example was correct? It was just basically random. Anyhow, if that was correct, then the examples using $len and isalnum will work fine except for unicode characters. Might not be a bad idea for isalpha and isalnum to match with unicode such as Japanese.

Anyhow, westor, if anything, your requirements would seem to make more sense for adding issymbol instead of ischar. Not only would it make more sense to people as far as what it's checking, but it would work well with the other is___ checks (you'd then have alpha,number,symbol to check and I think that would be all you'd need). Of course, what a symbol is would have to be determined for that and opinions on that may differ from person to person... probably why it's not there.
_________________________
Invision Support
#Invision on irc.irchighway.net

Top
Page 2 of 2 < 1 2