[FUNC]循环动作的实现

来源:互联网 发布:贵州广电网络怎么上网 编辑:程序博客网 时间:2024/05/17 10:04

方法一

$space::to+=1if to>3to:=1if (command(to)="左对齐")MsgBox 这里实现左对齐if (command(to)="居中")MsgBox 这里实现居中if (command(to)="右对齐")MsgBox 这里实现右对齐returncommand(index){commandstring:=["左对齐","居中","右对齐"]return  commandstring[index]}




方法二

$down::action:=command1()if (action="左对齐")MsgBox 这里实现左对齐if (action="居中")MsgBox 这里实现居中if (action="右对齐")MsgBox 这里实现右对齐returncommand1(){static indexindex+=0index:=mod(index,3)+1commandstring:=["左对齐","居中","右对齐"]return  commandstring[index]}