Filesystem-Commands

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > Filesystem-Commands >

Filesystem-Commands

GSI. - Get Shortcut Information

Previous Top Next


MiniRobotLanguage (MRL)

 

GSI. Command

Get Shortcut Information

 

 

Intention

 

Returns Targetpath, workdirectory and other information from a specified shortcut. Depending on parameters this can be the:

 

1.  LinkTarget

2.  WorkDir

3.  HotKey

4. ShowState

 

these are equivalent to the contents of the fields in the dialog (see picture below).

 

graphic

 

Further you can get information about:

 

5. Arguments

 

graphic

 

$$LNK=?desktop\BSC-Testform

GSI.arguments|$$LNK

DBP.$$000

ENR.

 

In the case above, the result would be:

 

graphic

 

as these are the arguments of the commandline.

 

You can also return the following values:

 

6.  Hotkey

7.  ShowState

8.  Comment

 

The following script will return the text in the "comment" field. Note that the number that is returned from the hotkey field is a "keycode" and you may only want to know if its a zero (no hotkey) or its a number.

 

$$LNK=?desktop\BSC-Testform

GSI.comment|$$LNK

DBP.$$000

ENR.

 

graphic

 

9. Iconlocation

   returns the path of the location of the icon, if it  is different from the link-target file.

 

 

graphic

 

10. show properties

 

You can make the command to open the file-properties dialog for any file (must not be a link).

 

$$LNK=?desktop\BSC-Testform

GSI.sfp|$$LNK

DBP.$$000

PAU.5

ENR.

 

 

 

 

 

 

Syntax

 

GSI.P1|P2[|P3]

 

 

Parameter Explanation

 

P1 - Subcommand

 

"comment","com" - returns the text from the "Comment field"

"arguments","arg" - returns the arguments from the "Command line"

"hotkey","hot" - returns a zero if no hotkey is defined, or a keycode number.

"workdir","wd" - returns the text from the "Start in" field

"linktarget","tar" - returns the text from the "Target" field

"iconlocation","ico" - returns the path of the location of the icon, if it

   is different from the link-target file.

"show state","sho" - returns a numerical representation of the "Run"-Setting

   as follows:

  1 - normal

  3 - start maximized

  7 - start minimized

 

  "show properties","sfp" - Will open the file-properties dialog for the given file, folder

   or shortcut.

 

 

 

P2 - Filename

P3 - (optional) Variable for the result, if omitted TOS is used.

 

 

 

 

Example

 

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

' GSI. - Sample

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

$$LNK=?desktop\BSC-Testform

GSI.sho|$$LNK

DBP.$$000

ENR.

 

 

$$LNK=?desktop\BSC-Testform.lnk

GSI.sfp|$$LNK

DBP.$$000

PAU.5

ENR.

 

 

 

 

Remarks

 

-

 

 

Limitations:

 

-

 

 

 

See also:

 

    CSC. - Create ShortCut

    1.5.2 Working with Text-Strings

    GFI. - Get File Information

    GFD. - Get File Date

    GFV. - Get File Version

    IFD. / NFD. - If File Date

    IFV. / NFV. If File Version

    GSS. - GetSplitString

    IEF. / NEF. - If - exist - File