我用VB怎么写一段每隔三分钟按下一次F2
来源:百度知道 编辑:UC知道 时间:2024/05/17 00:20:43
我用VB怎么写一段每隔三分钟按下一次F2,
我现在可以写一个计时器,但是不知道要怎么样才可以命令按下F2
我现在可以写一个计时器,但是不知道要怎么样才可以命令按下F2
添加一个Timer控件,设置其Interval属性为1000
以下是代码
dim i as integer
private sub timer1_timer()
i=i+1
if i = 180 then
sendkeys "{f2}"
i=0
end if
end sub
private sub timer1_timer()
dim i as Static
if i >= 180 then
i = 0
sendkeys "{f2}"
else
i = + 1
end if
end sub
还不如用按键精灵