Filesystem-Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Filesystem-Commands >

Filesystem-Commands

CSC. Create ShortCut

Previous Top Next


MiniRobotLanguage (MRL)

 

CSC. Command

Create Shortcut

 

 

Intention

 

This command is used to create a shortcut in the startmenu or an the desktop.

There are two paths we have to deal with.

 

1. The Path where the shortcut is been created. We call it the "Link-Path".

2. The Path of the file that the shortcut links to. We call it the "Target-Path".

 

The "Link-Path" is given by a keyword. For a complete List of the available keywords see below.

 

 

' Create a shortcut with CSC.

 

' This is the Target-Path

$$FIL=?desktop\Petroleum_de.pdf

 

' The Link-Path is specified by a keyword "desktop", and

' the Link-Name is "MyLink"

CSC.cdesktop|MyLink|$$FIL|||6|My comment

ENR.

 

 

Here is the Result:

 

graphic

 

 

graphic

 

These are the Parameters that can be specified.

 

 

 

Syntax

 

 

COP.P1|P2|P3[|P4][|P5][|P6][|P7]

 

 

Parameter Explanation

 

P1 - Specify "Link-Path". That is the  Place where the Link is been created. One of the following keywords can be used:

 

"desktop","cdesktop"   ->  <desktop>  

"udesktop","userdesk"  ->  <user name>\Desktop

"cdesktop","cserdesk"  -> All Users\Desktop    

"usmprog","ustartmenu programs" -> Start Menu\Programs  

"csmprog","cstartmenu programs" -> All Users\Programs

"ustartmenu","usm"     -> <user name>\Start Menu

"cstarmenu","csm"      -> All Users\Start Menu    

"mydocs"               -> My Documents  

"fav","favorites"       -> <user name>\Favorites  

"usmstartup","ustartup" -> Start Menu\Programs\Startup (Autorun)  

"csmstartup","cstartup" -> All Users\Startup  

"usendto"               -> <user name>\SendTo

"recent"                -> <user name>\Recent  

"bin","recycle bin"     -> <desktop>\Recycle Bin

"drives"                -> My Computer

 

P2 - Link-Name, without the ".lnk"

 

P3 - Target Path. Path of the file that is linked.

 

P4 - (optional) - Commandline-Arguments for Target-File

 

P5 - (optional) Working-Directory.

   If omitted, the Directory of the Target-Path is used.

 

P6 - (optional) numerical value that has the following meaning:

  0  - HIDE Window

  1 - SHOW NORMAL

  2 - SHOWMINIMIZED

  3 - SHOWMAXIMIZED

 

Please note that these values are interpreted (and often ignored) by the Target-program, not by windows.

 

P7 - (optional) Comment for the Comments field.

 

 

 

 

Example

 

'*****************************************************

' EXAMPLE: CSC. - Create Shortcut

'*****************************************************

$$FIL=?desktop\Petroleum_de.pdf

CSC.cdesktop|MyLink|$$FIL|||6|My comment

END.

 

 

 

Remarks

 

Wildcards are not supported.

 

The Timeout will be cleared. currently there is no internal check, if the operation was successful. You can use IEF. (If exist file) for this, if needed.

 

 

 

Limitations:

 

-

 

 

See also:

 

    GSI. - Get Shortcut Information

    IEF. / NEF. - If - exist - File

    3.3 Specialfolders

    ATF - Append-to-File

    CFF. - Copy-From-File

    CTF - Copy-To-File

    CTI. - Copy-To-Inifile

    CFI. - Copy-From_IniFile

    GLC. - Get-Line-Count

    LFF - Line-From-File

    SHF. - Shell-File-Operation

    WFF. - Wait-For-File