character ASCII code in InstallScript InstallShield
-
30-10-2019 - |
Question
I want to keep user from entering character > ASCII 127 in one of the password field in installer.
I googled but didn't find any direct way for this, currently i'm using:
CHAR ch;
STRING ASCII;
NUMBER nASCII;
for nCount = 0 to StrLength(sPassword)
ch = sPassword[nCount];
sprintf(ASCII,"%d",ch);
StrToNum(nASCII,ASCII);
if ( nASCII > 127 )
MessageBox("Invalid Character in Password",INFORMATION);
endif;
endfor;
Is there any better way to get ASCII code from a string?
No correct solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow