1. Home
  2. Docs
  3. Scense Embedded Scripting Guide
  4. Scense Native Scriptable Objects
  5. Process


The process object can be used to start an application or document.

Properties Description
Cancel Cancel the process after the LifeTime has elapsed
LifeTime Number of seconds to wait for the process to terminate (-1 = unlimited wait)
Priority Set the priority for the process to be started
Returncode Holds the return code fot the StartProcess function
ShowWindow Setting for the initial window
StartIn Pathname where the process should be started in.


Specify ‘True’ if Scense should wait for the process to terminate


Methods Description
StartProcess Start the new process.
This function accepts a “command” and returns a Boolean (True if success)

Function StartProcess(Command As String)



Sub Scense_Main()
    'Priority Classes
    Const IDLE_PRIORITY_CLASS = 64    
    'Show Window
    Const Hidden_Inactive = 0
    Const Normal_Active = 1
    Const Minimized_Active = 2
    Const Maximized_Active = 3
    Const Normal_no_Activate = 4
    Const Show_Active = 5
    Const Minimize_Inactive = 6
    Const Minimize_No_Activate = 7
    Const Show_No_Activate = 8
    With Process
        .StartIn = "c:\windows"
        .ShowWindow = Maximized_Active

        'Start the process
        If Not .StartProcess("c:\windows\notepad.exe") Then
            'Report the error
            WriteScenseLog "Error while starting the process: " & .ReturnCode
        End If
    End With    
End Sub