ShortcutInfo

Returns information on the specified shortcut file.

Syntax:

ShortcutInfo(link-name[, shortcut-type])

Parameters:

(s) link-name the name of shortcut .LNK file.

(i) shortcut-type [optional] specifies the type of shortcut. see below

Returns:

(s) a TAB delimited list of information on the shortcut file.

 

ShortcutInfo returns a TAB-delimited list containing the following items (some of which may be blank):

Value

Meaning

target  

the file or directory name which the shortcut points to.

params 

the command-line parameters for "target".

start-dir 

the "Start in" directory for "target".

show-mode 

the "Run" mode for "target": 1 (@ICON), 2 (@NORMAL), or 3 (@ZOOMED).

description 

the internal description for the shortcut.

hotkey 

the "shortcut key" for the shortcut.

icon-file 

the name of the icon file being used by the shortcut.

icon-index 

the 0-based index position within "icon-file" of the icon being used.

 

"shortcut-type" specifies the type of shortcut, and can be one of the following:

Type Meaning

0  Normal shortcut (default) 

1  Folder shortcut (Windows 2000/XP only) 

 

Example:


startdir=ShortCutDir("Desktop",0,0)
DirChange(startdir)
dest = StrCat(DirWindows(0),"notepad.exe")
ShortCutMake("mynotepad.lnk", dest, "", "", @NORMAL,0)
ShortCutEdit("mynotepad.lnk", "", "", startdir, @NORMAL,0)
ShortCutExtra("mynotepad.lnk", "Notepad shortcut", "^!n", "", 0,0)
info=ShortCutInfo("mynotepad.lnk")
target= ItemExtract(1, info, @TAB)
params= ItemExtract(2, info, @TAB)
workdir= ItemExtract(3, info, @TAB)
showmode= ItemExtract(4, info, @TAB)
desc= ItemExtract(5, info, @TAB)
hotkey= ItemExtract(6, info, @TAB)
iconfile= ItemExtract(7, info, @TAB)
iconindex= ItemExtract(8, info, @TAB)
editinfo=StrCat("filename=",target,@CRLF,"params=",params,@CRLF, "workdir=",workdir,@CRLF,"showmode=",showmode)
extrainfo=StrCat("desc=",desc,@CRLF,"hotkey=",hotkey,@CRLF, "iconfile=", iconfile,@CRLF,"iconindex=",iconindex)
Message("ShortcutInfo Syntax", StrCat(editinfo,@CRLF, extrainfo))
See Also:

ShortcutDir, ShortcutEdit, ShortcutExtra, ShortcutMake