【发布时间】:2011-09-14 10:37:56
【问题描述】:
我想阻止用户在安装程序的密码字段之一中输入字符 > ASCII 127。
我用谷歌搜索但没有找到任何直接的方法,目前我正在使用:
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;
有没有更好的方法从字符串中获取 ASCII 码?
【问题讨论】:
标签: windows-installer installshield installscript installscript-msi