论坛元老
 
- 积分
- 3772
- 金钱
- 3772
- 注册时间
- 2015-4-26
- 在线时间
- 765 小时
|
发表于 2016-2-25 16:53:58
|
显示全部楼层
[mw_shl_code=applescript,true]if((touch_dat>0&&touch_dat<10)||touch_dat==32)//按下的是数字
{
if(touch_dat==32)touch_dat=0;
if(touch_key==0)touch_key=touch_dat;//第一次按下
else if(touch_key>0&&touch_key<10) //第二次按下
{touch_key*=10;touch_key+=touch_dat;}
else if(touch_key>10&&touch_key<100)//第三次按下
{touch_key*=10;touch_key+=touch_dat;}
if(touch_key>=255)touch_key=0;//超出范围了-----------------------------------------------------------------------需处理
}[/mw_shl_code] |
|