Script to generate random string not working
问题 I'm trying to generate random string with white spaces but it is not working : /rs { %i=1 %r=$rand(1,50) %s=$rand(a,z) while(%i <= %r) { %i=%i+1 %s=%s $+ $rand(a,z) if(1 == rand(1,4) %s=%s $+ $chr(32) } echo %s } Returns : WHILE(%I Unknown command Any ideas ? 回答1: You had some issues, those are just few of them. Spaces: mSL statements are sensebile when it concerns to spaces, those you should put spaces between the while (expression) , if (expression) and even %i = 1 and %r = $rand(1,50) etc'