AddCode Method |
Description
Adds specified code to a module.
PowerBASIC Syntax
Arguments
Remarks
AddCode may be called multiple times.
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)
|