MakeShortcutEx

Description:

baMakeShortcutEx creates a shortcut.

Platforms:

Windows

Usage:

Result = baMakeShortcutEx( FileName, Path, Title, Args, WorkDir, Icon, IconNumber, Hotkey, State )

Arguments:

String, string, string, string, string, string, integer, integer, string.
Filename is the name of the file the shortcut will point to.
Path is the folder to create the shortcut in.
Title is the name of the shortcut.
Args is any command line arguments to use.
WorkDir is the working directory to set.
Icon is the name of the icon file.
IconNumber is the number of the icon in Icon to use.
Hokey is the virtual key code of the hotkey to assign to the shortcut.
State is the state to start the program in. Can be "normal", "min", "max"

Returns:

Integer.
Returns 1 if successful, else 0.

Examples:

Director:
ok = baMakeShortcutEx( "c:\windows\notepad.exe", "c:\temp", "My Notepad", "", "c:\windows", "c:\windows\system32\shell32.dll", 12, 65, "normal" )

Authorware:
ok := baMakeShortcutEx( "c:\\window\\notepad.exe", baSysFolder( "desktop" ), "My Document", docpath ^ "theFile.txt", "", "", 0, 65, "max" )
 

Notes:

This function is an extended version of baMakeShortcut. Only the first three arguments are required - if any of the others are an empty string or 0, they will be ignored.

The Icon parameter can be either an .ico, .exe or .dll file. If the file is a .ico, then the IconNumber parameter is ignored. If it is a .exe or .dll file, then the IconNumber is the number of the icon in that file to use. If the Icon is an empty string (""), then the first icon in the Command .exe file will be used.

The Hotkey is a number that represents the virtual key code to use as the hotkey. The actual hotkey will be Ctrl + Alt + the key. eg a value of 65 will produce a hotkey of Ctrl+Alt+A. If the value is negative then Shift will also be used. eg -66 will produce Ctrl+Alt+Shift+B. A list of Virtual Key Codes is supplied.

 

See also:

baMakeShortcut
baResolveShortcut