Reset |
Description
Discards all scripting code and objects that have been added to the ScriptControl.
PowerBASIC Syntax
Remarks
The State property of the ScriptControl is reset to Initialized (0).
Example [PowerBASIC]
#INCLUDE "MSSCRIPT.INC"
DIM pSc AS IScriptControl DIM strScript AS STRING
pSc = NEWCOM "MSScriptControl.ScriptControl" pSc.Language = UCODE$("VBScript") pSc.AllowUI = %VARIANT_TRUE pSc.TimeOut = 1000 strScript = "Sub Main" & $CRLF & _ " For i = 1 to 10000000" & $CRLF & _ " x = x + i" & $CRLF & _ " Next" & $CRLF & _ " Msgbox ""Done"" " & $CRLF & _ "End Sub" pSc.AddCode UCODE$(StrScript) ' Reset the Script Control pSc.Reset
|