<< Click to Display Table of Contents >> Navigation: 3. Script Language > PDC. - Private Desktop Commands > PDC. - Private Desktop Commands |
MiniRobotLanguage (MRL)
PDC.Run on Desktop WFI/WFO
Used to start a program on a private Desktop (Hidden Desktop)
Intention
This Commands will start a program on an existing "private Desktop" (PD).
The PD must exist, if the Desktop does not exist, the Program will not start the executable.
For more Details on "Private Desktops" (PD) see here: PDC - General Information.
There are two versions of this command:
PDC.Run on Desktop WFI|DTB|?path\Desktops_Manager.exe
and
PDC.Run on Desktop WFO|DTB|?path\Desktops_Manager.exe
In most cases there will be no big difference between either of these.
Technically the "WFI"-Version makes an "Wait for Input Idle" after the executable was started.
While the "WFO"-Version makes an "Wait for Single Object".
Depending on the Type of program you are starting any of these may be the perfect System,
to get the Moment, when the Program is really running.
In most cases you can choose the "WFO"-Version, and if it will block or not be like you want, choose the WFI-Version.
To run an executable on a PD you can simply type:
PDC.Create Desktop no Explorer|DTB
PDC.Run on Desktop WFO|DTB|?path\Desktops_Manager.exe
PDC.Switch to Desktop|DTB
PRR.1|DTB
MBX.Click to proceed
PDC.Goto Default
ENR.
PRE.
ENR.
To run an executable on a PD with another User you can simply type:
'----------------------------------------
' We are starting a ParallelRobot on the "new Desktop"
' to make the Switchback more easy.
' Here we use the PDC.Setuser to start something with another User
'
PDC.Create Desktop no Explorer|DTB
PDC.Set User|StandardAdmin|Pass2
PDC.Run on Desktop WFO|DTB|?path\Desktops_Manager.exe
PDC.Switch to Desktop|DTB
PRR.1|DTB
MBX.Click to proceed
PDC.Goto Default
ENR.
PRE.
ENR.
In the Task-Manager you can see the success:
This will also work on the "Default" Desktop.
PDC.Set User|StandardAdmin|Pass2
PDC.Run on Desktop WFO|Default|?path\Desktops_Manager.exe
Syntax:
PDC.Run on Desktop WFI|P1|P2[|P3]
PDC.Ruda|P1|P2[|P3]
PDC.Run on Desktop WFO|P1|P2[|P3]
PDC.Rudb|P1|P2[|P3]
Parameter Explanation:
P1 - (in) The name of the new private Desktop.
P2 - (in) The name and path of the executable.
P3 - (in,optional) a number >0 that specified a waiting time in ms.
This waiting-time is applied after the executable was started.
Example:
'----------------------------------------
' We are starting a ParallelRobot on the "new Desktop"
' to make the Switchback more easy.
'
PDC.Create Desktop no Explorer|DTB
PDC.Run on Desktop WFO|DTB|?path\Desktops_Manager.exe
PDC.Switch to Desktop|DTB
PRR.1|DTB
MBX.Click to proceed
PDC.Goto Default
ENR.
PRE.
ENR.
'----------------------------------------
' We are starting a ParallelRobot on the "new Desktop"
' to make the Switchback more easy.
' Here we use the PDC.Setuser to start something with another User
'
PDC.Create Desktop no Explorer|DTB
PDC.Set User|StandardAdmin|Pass2
PDC.Run on Desktop WFO|DTB|?path\Desktops_Manager.exe
PDC.Switch to Desktop|DTB
PRR.1|DTB
MBX.Click to proceed
PDC.Goto Default
ENR.
PRE.
ENR.
Remarks:
The PDC.SetUser-Feature is supported.
This feature is currently experimental, therefore not all features of the SPR and the SPR-Editor may work as expected on private Desktops. To create a private Desktop, the Executable needs Admin-Rights.
Limitations:
This Feature may require Windows Vista or higher.
See also:
• 2.1.5 '#HID: - Hidden Desktop Scripts
• ICD./NCD. - If/Not Current Desktop
• IPD./NPD. - If/Not Private Desktop
• PDC.Create Desktop no Explorer
• PDC.Create Desktop with Explorer
• PDC.Get current Desktop Name
• 2.1.4 '#EXV: - Execute on System Desktop
• HDC. - Hidden Desktop Control
• #ONCE / # OEND - Multiple Include Protection
• 2.1.8 '#INC: - Include Files and Folders into the Executable