<< Click to Display Table of Contents >> Navigation: 3. Script Language > PDC. - Private Desktop Commands > PDC. - Private Desktop Commands |
MiniRobotLanguage (MRL)
PDC.Get current Desktop Name
Used to get the Name of the Desktop where a Script is running
Intention
This Command will find out the Name of the "private Desktop" (PD) where the Script is running.
For more Details on "Private Desktops" (PD) see here: PDC - General Information.
There are two way to use this command::
PDC.Get Current Desktop Name
MBX.$tos$
ENR.
' Or
PDC.Get Current Desktop Name|$$NAM
MBX.$$NAM
ENR.
Important:
Switching to a desktop using PDC.Switch to Desktop|(PD-Name)
will not change the value that is returned with PDC.Get Current Desktop Name
The reason is, that the Script itself ist always running at the desktop where it was started,
In fact the return of this command is "The desktop where the Script was started."
PDC.Create Desktop with Explorer|DTA
PDC.Switch to Desktop|DTA
PDC.Get Current Desktop Name
MBX.$tos$
ENR.
Switching the "View" does not make the Script to do things on another Desktop.
To do this you need to run a Script on that other Desktop.
You can do this for example using '#HID: or using the new enhanced PRR./PRE.-command.
Syntax:
PDC.Get current Desktop Name[|P1]
PDC.GDN[|P1]
Parameter Explanation:
P1 - The name of the private Desktop where the Script is running. If omitted, the result is placed on TOS.
Example:
'----------------------------------------
'
PDC.Get Current Desktop Name|$$TXT
MBX.The name of the PD where the Script was started is: $$TXT
END.
Remarks:
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
• 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