以下代码在2.1版本成功,曾经成功短暂实现,老是static出错, 经过两个多小时折腾,终于实现:
按键a依次实现ctrl+1,2,3:
a::{
static x := 0
x += 1 ; Maintain a tally locally (its value is remembered between calls).
if (x = 1){
Send "^{3}"
MsgBox "The result is: " x
Sleep 5
}
if (x = 2){
Send "^{2}"
MsgBox "The result is: " x
Sleep 5
}
if (x = 3){
Send "^{1}"
MsgBox "The result is: " x
Sleep 5
x := 0
}
}