Properties and methods to manage shell links or shortcuts.
App.scClear
App.scRead(f$)
App.scWrite(f$)
App.scPath [ = string ]
App.scDescription [ = string ]
App.scShowCmd [ = long ]
App.scDirectory [ = string ]
App.scArguments [ = string ]
App.scHotkey [ = long ]
App.scIconPath [ = string ]
App.scIconIndex [ = Long ]
Usually, an user creates a shell link by choosing the Create Shortcut command from an object's context menu. The system automatically creates an icon for the shell link by combining the object's icon with a small arrow (known as the system-defined link overlay icon) that appears in the lower left corner of the icon. A shell link that has an icon is called a shortcut; however, the terms shell link and shortcut are often used interchangeably.
GFA-BASIC 32 applications can also create and use shell links and shortcuts. For example, a word processing application might create a shell link to implement a list of the most recently used documents. In GFA-BASIC 32 you create a shell link by using the methods and properties of the App object.
Methods:
The scClear method clears all App.scXXX shell link related properties. These are the properties listed in the Syntax part.
The scRead(f$) method gets the settings from an external .lnk file f$.
The scWrite(f$) method creates and saves the shortcut file f$.
Properties:
scPath - Specifies the location (path) of the object referenced by the shortcut.
scDescription - Specifies the shortcut's description string, which the user never sees.
scShowCmd - Specifies the initial show state of the application (SW_xxx constant).
scDirectory - Specifies the working directory of the corresponding object, where files are loaded and saved when the user does not identify a specific directory.
scArguments - Specifies the arguments to pass to the object specified in scPath.
scHotkey - Global windows key to run the shortcut. The virtual key code is in the low-order byte, and the modifier flags are in the high-order byte. Bits 8, 9, and 10 represent Shift, Control, and Alt, respectively.
scIconPath - Icon file to use for the shortcut.
scIconIndex - Index to icon in the icon file specified in scIconPath.
The shortcut's name, which is a string that appears below the shell link icon, is actually the file name of the shortcut itself and which is specified in scWrite. The user can edit the description string by selecting it and entering a new string.
App.scClear
App.scDirectory = SysDir
App.scIconIndex = 2
App.scIconPath = WinDir & "\Winfile.exe"
App.scArguments = #34 & SysDir & #34
App.scDescription = "System Folder"
App.scPath = WinDir & "\Explorer.Exe"
App.scWrite App.scPrograms & "\GFA32\System-Folder.lnk" // Change this to an appropriate file in your Program Files folder
{Created by Sjouke Hamstra; Last updated: 22/10/2014 by James Gaite}