从其他iMacros脚本运行VBS文件(iMacros脚本)

时间:2016-10-27 15:38:20

标签: vbscript imacros

所有都在标题中。我想从一个iMacros脚本运行VBS文件(几个iMacros脚本)。

我对iMacros语言和语法一无所知,但我做到了这一点:

option explicit
randomize

Dim iim1, iret

Set iim1 = createobject("imacros")

iret = iim1.iimOpen("-ie -ieprivate", true, 300)

Dim launch

launch = launch + "url goto = http://lequipe.fr" + vbNewLine

iret = iim1.iimPlayCode(launch)

此代码私下打开IE然后启动http://lequipe.fr但我不知道如何使用iMacros语法运行文件。

在VBS中,这将是这样的:

Dim WshShell, i, count

Set WshShell = CreateObject("WScript.Shell")

i = 1
count = 3

While i <= count
    If i = 1 Then
        WshShell.Run "C:\Users\Quentin\Desktop\iMacro\testequipe.vbs"
    Else If i = 2 Then
        WshShell.Run "C:\Users\Quentin\Desktop\iMacro\testprogres.vbs"
    Else If i = 3 Then
        WshShell.Run "C:\Users\Quentin\Desktop\iMacro\testmonde.vbs"
    End If
    i = i + 1
Wend

感谢您的回答。

0 个答案:

没有答案