sc := ComObjCreate("ScriptControl")
;// define the Language
sc.Language := "VBScript"
;// define the VBScript
script =
(
Dim string
Arr = Array("Auto", "Hot", "key!")
For Each i In Arr
string = string & i
Next
MsgBox "Joined Array Elements:" & vbCR & string, 64, "VBScript MsgBox"
)
;// execute the VBScript
sc.ExecuteStatement(script)
;// extract values from the VBScript
MsgBox, 64, AutoHotkey MsgBox, % "Joined Array Elements:`n" sc.Eval("Arr(0) & Arr(1) & Arr(2)")
[AHK]用ahk执行VBScript脚本
最新推荐文章于 2024-07-03 21:30:12 发布