+ -
当前位置:首页 → 问答吧 → 求高手帮忙看下这个个每隔2个小时自动运行一个批处理文件的脚本

求高手帮忙看下这个个每隔2个小时自动运行一个批处理文件的脚本

时间:2011-12-02

来源:互联网

写了个每隔2个小时自动运行一个批处理文件的脚本,但是为什么运行就提示行6,字符1,缺少语句,800A0400的错误啊
求高手指点下


Private Sub Form_Load()
Timer1.Interval = 60000
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
Static s As Integer
s = s + 1
If s = 120 Then
set ws=WScript.CreateObject("WScript.Shell") 
ws.Run "C:\windows\11.bat",0 
End If
End Sub

作者: nickcj1983   发布时间: 2011-12-02

Dim s as Integer
Private Sub Form_Load()
s=0
Timer1.Interval = 60000
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
s = s + 1
If s = 120 Then
 s=0
 Shell "C:\windows\11.bat",vbHide
End If
End Sub

作者: zhao4zhong1   发布时间: 2011-12-02

做成任务不是方便点

作者: patrickkong   发布时间: 2011-12-02

热门下载

更多