Code: Select all
oSC := ComObjCreate("ScriptControl")
oSC.Language := "VBScript"
oSC.Timeout := -1 ;removes the timeout
ahkvariable := 2
code =
(
;your vbscript
variable = %ahkvariable%
)
oSC.ExecuteStatement(code) ;execute your code
variable := oSC.Eval("variable") ;you have to pull out any variables from the vbscript to be able to use them
Code: Select all
[PCOMM SCRIPT HEADER]
LANGUAGE=VBSCRIPT
DESCRIPTION=
[PCOMM SCRIPT SOURCE]
OPTION EXPLICIT
autECLSession.SetConnectionByName(ThisSessionName)
REM This line calls the macro subroutine
subSub1_
sub subSub1_()
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "prof"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[enter]"
autECLSession.autECLPS.WaitForAttrib 5,26,"00","3c",3,10000
autECLSession.autECLPS.WaitForCursor 5,27,10000
autECLSession.autECLOIA.WaitForAppAvailable
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "3946"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[enter]"
end sub