Smart Package Robot 's "Script to Executable" Compiler

<< Click to Display Table of Contents >>

Navigation:  2. Components > 2. EXE-Compiler >

Smart Package Robot 's "Script to Executable" Compiler

#HID: - Execute on private Desktop

Previous Top Next


Compiler-Directives

 

#HID: - Execute compiled Script on private Desktop

Used to start the Automation on a private Desktop (Hidden Desktop)

 

 

Intention

 

This Compiler-Directive enables you, to start your compiled SPR-Skript on a "Hidden Private Desktop".

 

To start SPR Scripts on a private Desktop, the Executable needs Admin-Rights.

 

The '#HID: Compiler Directive is used to have the compiled executable start up on the private Desktop.

For this it must be started with full Admin-Rights!

 

If you have created private Desktops, these will be displayed in the SPR-Editor, in the "Desktops-Inspector".

In this Example, you can see a Desktop that was created using:

 

   '#HID:1

 

Desktops-Inspector

 

If you specify a number after "'#HID:", the SPR will prefix ist with "Desktop-" and generate a new private Desktop

with the name "Desktop-1".

 

If there is no such Compiler Directive, the compiled Executable will start on the actual User Desktop.

 

The following Sample-Script will generate a Messagebox on an private Desktop, and switch to this desktop.

Once you have confirmed the Messagebox, the SPR will close the private Desktop.

 

'#EXE:?path\

'#SPI:ForceWrite

'#MAN:ra

'#HID:1|scn

MBX.!!

ENR.

 

 

   Important:

  To take a look on an private Desktop - for example to check for error-Messages - as well, as to
   Switch back from an "private Desktop" to the "Default Desktop",

  you may need to use the "Switch Desktop"-Tool that is provided together with this SPR-Release.

 

Desktop-Switch

 

Des_manag

Also you will find the Tool "Desktops Manager.exe" in the Startmenu.

 

For more Information on "private Desktops" see here: PDC. - Private Desktop Commands

 

 

Syntax:

 

'#HID:P1[|P2]

 

 

Parameter Explanation:

 
P1 - Number from 1-9 that will be used internally to create the private Desktop. The name of the new created private Desktop will be "Desktop-P1"

      If you specify "'#HID:1", then the name of the new created private Desktop will be "Desktop-1".

 

You can use Numbers from 1 to 9 with '#HID:.

     Using higher Numbers may work with Scripts, but these numbers may not work with the "Desktop-Switcher"-Utility.

     If you really ever need higher numbers, you can switch to these Desktops using a SPR-Script that is compiled with the "s"-flag.

 

 

P2  - can be any or more of these letters (flags):

    s - switch to Desktop, using this flag, will make the Script to switch to the specified private Desktop.

    n - new Desktop. Using this Flag will force the creation of a new private Desktop, rather then using an existing one.

    c - close the Desktop when the Script ends.

 

DANGER: Using the "c"-Flag will forcefully terminate all processes that are bound to the new created Desktop! Also note that this flag is currently experimental.

 
   Before the new created Desktop can be closed, the Script switches to the new Desktop.

   When the new Desktop has been closed, the Script switches to the Default desktop.

 

 

Example:

 

'----------------------------------------

' Compile-Time Commands

'----------------------------------------

'

' The following line will make the compiled

' executable start up on the private Desktop "Desktop-1".

' It will only work if the Script has full admin-rights.

' To see the Message box, you need to switch to the private Desktop.

'

'#HID:1|c

'

MBX.I am the Smart Package Robot!

END.

 

 

'----------------------------------------

' Compile-Time Commands

'----------------------------------------

'

' The following line will make the compiled

' executable start up on the private Desktop "Desktop-2".

' It will only work if the Script has full admin-rights.

' The command will switch to the private Desktop.
' After you click the Messagebox, the private Desktop will be removed.

'

'#HID:2|scn

'

MBX.I am the Smart Package Robot on Desk 2!

END.

 

 

Remarks:

 

'#HID: does work with '#RAU:.

 

 

Limitations:

 

    This Feature may require Windows Vista or higher.

    This feature needs Admin-Rights!

This feature is currently experimental, therefore not all features of the SPR and the SPR-Editor may work as expected on private Desktops.
Using the "c"-Option may have unwanted effects on programs running on the Computer, also on otehr desktops.

For Limitations in the Windows-Explorer itself, not all Actions will be possible on "private Desktops".
Sometimes System-Windows - like the Start-Menu - will not open on the "private Desktop" but on the Default Desktop.

 

 

See also:

 

    PDC. - Private Desktop Commands

    EXV. - Execute via System

    2.1.4 '#EXV: - Execute on System Desktop

    HDC. - Hidden Desktop Control

    '#RAU: Run as User    

    2.3.0. '#MAN: - Manifest for Executable