按键精灵 一个脚本问题

我想实现这样一个 东西 就是 A,B,C,D技能 循环使用间隔500毫秒 ,然后 还有两个技能E,F每30分钟 使用一次 ,最后有个G技能 每隔1小时 使用一次 写在一个脚本里 这东西要怎么写呢? 求高人指点谢谢

你好,可以这样写:
这是第一个脚本,纯粹循环式:

Rem 开始
For 2
For 900
x=65
For 4
KeyPress x,1
Delay 500
x=x+1
EndFor
EndFor
KeyPress 69,1
KeyPress 70,1
EndFor
KeyPress 71,1
Goto 开始

第二个用多线程:
BeginThread "支线1"
BeginThread "支线2"
//下面是主线:abcd组
While 1
x=65
For 4
Delay 500
KeyPress x,1
Delay 500
x=x+1
EndFor
EndWhile
Sub 支线1
//支线1:ef组
Delay 1.8*10^6
KeyPress 69,1
KeyPress 70,1
Delay 1.8*10^6
Gosub 支线1
Return
Sub 支线2
//支线2:g组
Delay 3.6*10^6
KeyPress 71,1
Delay 3.6*10^6
Gosub 支线2
Return

有三个地方需要你设置,第一个是按abcd组的,第二个是按e,f组的,第三个是g组的,如果一开始就要把abcdefg七个技能全放,就把每组按键上面的延时删掉,反之就把下面的延时删掉,可以根据自己的需要来改,哪一种更适合你可以比较一下看。
温馨提示:答案为网友推荐,仅供参考
第1个回答  2009-09-13
下面两个脚本都可以.您随便用个就可以了.只不过一个思路用循环计时,一个用变量计次.

Rem 开始
For 2
For 900
KeyPress 65,1
Delay 500
KeyPress 66,1
Delay 500
KeyPress 67,1
Delay 500
KeyPress 68,1
Delay 500
EndFor
KeyPress 69,1
Delay 500
KeyPress 70,1
Delay 500
EndFor
KeyPress 71,1
Delay 500
Goto 开始

b=0
y=0
Rem 开始
KeyPress 65,1
Delay 500
KeyPress 66,1
Delay 500
KeyPress 67,1
Delay 500
KeyPress 68,1
Delay 500
b=b+1
y=y+1
If b=900
KeyPress 69,1
Delay 500
KeyPress 70,1
Delay 500
b=0
EndIf
If y=1800
KeyPress 71,1
Delay 500
y=0
EndIf
Goto 开始
相似回答