This is a simple identifier to use to
capitalize the first letter of a string
if for example you were to create a popup
or remote response that begins with a
nickname and want it to look proper.
; usage: $caps(string of text or $nick or $1 etc)
alias caps return $regsubex($1-,/^(.)/S,$upper(\t))
its says that i have been useing it for 156 or something days lol
and well i cant right click to set my colours so i have got "gummo's" colour script now.
i looked in the script file and they were gone but it doesn't really matter as i can get new ones.
in all the rooms i got in im a @ or higher but when this happened i was a + in them. i tried '/ns update' and it did only some of them. but its ok now.
KyleJack-Daniels
mIRC used to (maybe still does) if it is unregistered reset the mirc.ini file some time after the 30 day trial period had ended. It did not delete scripts but it would appear as if it did since they would be unloaded after the reset. Also, after the reset all color settings would return to default settings. Maybe this is what you have experienced.
gooshie
KyleJack-Daniels
You may not really need this script. It is best used with custom pop-ups and response type events when you need to make sure the first word is capitalized for instance if you begin a sentence with a nickname (some people don't capitalize their nick).
There may be other occasional uses.
usage: $caps(string of text or $nick or $1 etc)
Example: Friend Pop-up:say $caps($1) is my friend!
(This would insure that any nick you selected would appear capitalized
regardless if that persons nick began with a capital letter.)
To easily add the alias to your alias section you can simply
enter in mIRC editbox => /alias caps return $regsubex($1-,/^(.)/S,$upper(\t))
To test you could
enter in editbox => //echo $caps(test first letter of first word is capitalized.)
In actual practice it would not be necessary to send the whole line to $caps just whatever word needed to be capitalized. Also, there would be no reason to use it for 'static' words as you could simply type those in with the caps already in place.
gooshie
KyleLack-Daniels
On these small, stand alone aliases it's best to NOT use the alias word
and add it into the alias section of your mirc client. Typically we tend
to post it with the alias word simply to make it obvious to the most
casual observer that it is in fact an alias. On more elaborate scripts
with on events that require a few aliases just for its use, by preceeding
the alias with the word alias it can be kept with its parents/dependents
in one script file and loaded into the remote section of the script editor
for easier reading, modifications, and troubleshooting.
Please consult your mirc help files under alias section and after that if
you still have questions feel free to return here for more help.
gooshie
@Sunslayer;
$regsubex($1-,/(\w)(.+?)(\W)/g,$+($upper(\1),$lower(\2),\3))
will capitalize the first letter and make the rest of the word lowercase for each word which looks better imo
I'm not really sure why you had to use (.+)(\W|\b). You should have only needed two backreferences at most.
alias _upper return $regsubex($1-,/(\w)(\w+)/g,$upper(\1) $+ $lower(\2))
@Testor thats because Nick-away is one word :p
$regsubex($1-,/(\w)(.+?)(\W|\b)/g,$+($upper(\1),$lower(\2),\3))
will separate words by any non alphanumeric char
And if you Lower the whole string, then new sentences are all also lower cased, unless it actually does that o.O. if your referring to
$lower(\2)
that doesn't lower the whole string, just $right($1,-1)