dim间隔怎么设置

更新时间:02-07 教程 由 画青笺ぶ 分享

dim间隔怎么设置?

UserVar s1=60 "设置按键1施放间隔时间"

UserVar s2=90 "设置按键2施放间隔时间"

UserVar s3=120 "设置按键3施放间隔时间"

dim number(2),thetime(2),key(2),sj(2)

Dim a, b, c, d, s1, s2, s3, t1, t2, t3, L

thetime(0) = s1 : thetime(1) = s2 : thetime(2) = s3

t1 = now : t2 = now : t3 = now

Call 判断时间()

While true

//条件无限循环

If DateDiff("s",t1,now)>=sj(0) Then

//< DateDiff 函数:返回两个日期之间的时间间隔>

//<"s":秒>

Delay 10

KeyPress "4", 1

t1=now

//重新赋值日期时间到变量

End If

If DateDiff("s",t2,now)>=sj(1) Then

Delay 10

KeyPress "5", 1

t2=now

End If

If DateDiff("s",t3,now)>=sj(2) Then

Delay 10

LeftClick 1

t3=now

End If

Delay 10

Wend

Sub 判断时间()

c=0:d=0

For 3

If IsNumeric(thetime(c))=True Then

//< IsNumeric 函数:返回布尔值指明表达式的值是否为数字>

sj(d)=cint(thetime(c))

//< CInt 函数:返回已被转换为整形子类型的变体的表达式>

Else

Call 结束()

End If

c=c+1:d=d+1

Delay 10

Next

End Sub

Sub 结束()

MessageBox "输入错误 脚本停止运行"

EndScript

End Sub

时间请自定义设置,计时单位为秒

声明:关于《dim间隔怎么设置》以上内容仅供参考,若您的权利被侵害,请联系13825271@qq.com
本文网址:http://www.25820.com/tutorial/14_2196381.html