RtStatus

 

Returns a number indicating the current execution mode of WinBatch.

Syntax:

RtStatus( )

Parameters:

none

Returns:

(i) execution mode 0 - WinBatch Interpreter
1 - Compiled WinBatch EXE file
5 - Compiled WinBatch Service (EXS file)
10 - WinBatch Studio debug
12 = FileMenu
13 = PopMenu
14 = WebBatch
15 = WinMacro
16 = WinBatch Console

Example:


flag=RtStatus()
Switch flag
   Case 0
      type="WinBatch Interpreted Script"
      Break
   Case 1
      type="Compiled WinBatch EXE file"
      Break
   Case 5
      type="Compiled WinBatch Service (EXS file)"
      Break
   Case 10
      type="WinBatch Studio Debug"
      Break
   Case 12
      type="FileMenu"
      Break
   Case 13
      type="PopMenu"
      Break
   Case 14
      type="WebBatch"
      Break
   Case 15
      type="WinMacro"
      Break
   Case 16
      type="WinBatch Console"
      Break
   Case flag
      type="Unknown"
      Break
End Switch
Message("Code running as",type)