I am switching to Mscheduler from MExpress hoping to take advantage of compiler to exe and VBscript supporting. This is my second day using it. I tried using Run Program, ExecuteFile and Macro but none can solve my problem. The example code below is for CreateIE and DestroyIE. Can I create two separate macros/scripts for these two VBScript subs? The reason is I want to reuse CreateIE and DestoryIE in many exe files:
1) CreateIE, do some verification, DestroyIE
2) CreateIE, do another verification, DestroyIE
3) etc.
I can copy/paste CreateIE and DestroyIE in all my scripts but that would defeat the reusable code purpose. Thanks in advance for your help.
StartBrowser.scp contained:
////////////////////////////////////////////////////////
VBSTART
Public IE
'Launch IE app and navigate to URL
Sub CreateIE(URL)
Set IE = CreateObject("InternetExplorer.Application")
IE.visible = 1
IE.visible = 1
IE.Left = 0
IE.Top = 0
IE.Width = 900
IE.Height = 900
IE.navigate URL
do while IE.Busy and Wait
loop
End Sub
'Waiting while IE busy
Sub WaitBusy
do while IE.Busy and Wait
loop
End Sub
VBEND
CloseBrowser.scp contained:
////////////////////////////////////////////////////////
VBSTART
'Destroy IE browser
Sub DestroyIE
IE.Quit
Set IE = Nothing
End Sub
VBEND
include exe in another exe file
Moderators: Dorian (MJT support), JRL
No you can't do this. In any case both functions need to be in the same VBScript block as they refer to the same object.
MJT Net Support
[email protected]
[email protected]