mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2003
Posts: 31
B
Bleepy Offline OP
Ameglian cow
OP Offline
Ameglian cow
B
Joined: May 2003
Posts: 31
I was just messing about with $rand, and discovered that you can actually enter characters instead of numbers/letters. For example: $rand(*,&), or even $rand(a,Z) (note the little a and big Z) will return some random non-alpha/numeric characters aswell as a and Z. For example, 'a' is $chr(97) and 'Z' is $chr(90), so mIRC is returning $chr(X) where X is between 90 and 97. Understand?

Just a little something I found out that may be useful to know. I couldn't find this on a thread (if it's there, then I missed it) and so I thought I'd just post it smile


bleepy.


@#HelpDesk - DALnet
Joined: Feb 2003
Posts: 2,812
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2003
Posts: 2,812
This is a documented feature of $rand, except that it has changed a couple times in the last several versions. Earlier versions did not allow you to specify non-alphanumeric characters or mixed cases like a,Z... but only 1,9 a,z and A,Z.

There have been many threads in the last several months requesting further extension to this, allowing multiple character ranges and string lengths... even encorporation of regular expression-like patterns.

fun stuff.


Well. At least I won lunch.
Good philosophy, see good in bad, I like!

Link Copied to Clipboard