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. |
| Wait
|
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) |
Usage:
Sub Scense_Main()
'Priority Classes
Const IDLE_PRIORITY_CLASS = 64
Const NORMAL_PRIORITY_CLASS = 32
Const HIGH_PRIORITY_CLASS = 128
'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
'Initialize
.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