Simple, but very necessary tool for password generation.
menu menubar {
-
Generate Password : {
clipboard $(,$str($!r(A,Z) $!+ $!r(0,9) $!+ $!r(a,z) $!+ $chr(32),$int($input(Password length:,eoq,,3))))
return $input(New password was copied to clipboard.,o,Generate Password)
}
}
$r(A,z) could return characters in the 91-96 range which are neither letters nor digits. also, the form $regsubex($str(.,N),/./g,$ident) is not something i would say is 'much easier' than the very similar $($str($!ident $!+ $chr(32),N),2). the only advantage $regsubex() has in the general case is prevention of potential 'line too long' errors resulting from the evaluation of $str() with the latter method.
Spoofing, if you're releasing a script for public usage, i would advise against using undocumented and quirky functions such as $(,code) acting as $(code,2). it could be changed at any time, much like $(,,code) was, at one time, used to nullify code and then was promptly 'fixed'. these features are best noted and pushed to the back of one's mind!