Status Property

 

Description

 

Provides status information about a script run with the Exec method.

 

PowerBASIC Syntax

 

PROPERTY GET Status () AS LONG

 

Return Value

 

LONG. The Status property returns a value from the WshExecStatus enumerated type. WshRunning = 0, WshFinished = 1, WshFailed = 2.

 

Example [PowerBASIC]

 

#INCLUDE "WSHOM.INC"

 

DIM pWsh3 AS IWshShell3

DIM pWshExec AS IWshExec

 

pWsh3 = NEWCOM "WScript.Shell"

pWshExec = pWsh3.Exec(UCODE$("calc"))

DO

   IF pWshExec.Status <> 0 THEN EXIT DO

   SLEEP 100

LOOP

PRINT "Status: " pWshExec.Status

 

Valid XHTML 1.0 Transitional