addShortCut

>>-addShortCut--(--name--,--program--------------------------------------->

>--+---------------------------------------------------------------------->
   |                  +-0------+
   +-,-+----------+-,-+--------+-,-+---------+-,-+------+-,-+--------+-,-->
       +-iconfile-+   +-iconnr-+   +-workdir-+   +-args-+   +-hotkey-+

>-------------------+--)-------------------------------------------------><
    +-"NORMAL"----+ |
>---+-------------+-+
    +-"MAXIMIZED"-+
    +-"MINIMIZED"-+

Creates a shortcut within the specified folder.

Arguments:

The arguments are:

name

The full name of the shortcut.

program

The program file launched by the shortcut.

iconfile

The name of the icon used for the shortcut. If not specified, the icon of program is used.

iconnr

The number of the icon within the iconfile. The default is 0.

workdir

The working directory of the shortcut.

args

The arguments passed to the program that the shortcut refers to.

hotkey

The virtual key to be used as a hotkey to open the shortcut. For a list of the key names, see Symbolic Names for Virtual Keys.

run

Specifies one of the options listed in the syntax diagram. The default is "NORMAL".

Example:

The following example creates a shortcut named "My NotePad" to the Notepad editor within the directory c:\temp:

pm = .WindowsProgramManager~new
	if pm~InitCode \= 0 then exit
	pm~addShortCut("c:\temp\My Notepad","%SystemRoot%\system32\notepad.exe")
	::requires "winsystm.cls"