creating_20a_20shortcut
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| creating_20a_20shortcut [2018/03/31 13:19] – external edit 127.0.0.1 | creating_20a_20shortcut [2024/01/05 00:22] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| =====Creating a shortcut===== | =====Creating a shortcut===== | ||
| - | //by Richard Russell, June 2007//\\ \\ If you want to create a shortcut (link) to a file or a folder, you can do it using the **PROCshortcut** routine listed below. You would call the routine using code similar to the following:\\ | + | //by Richard Russell, June 2007//\\ \\ If you want to create a shortcut (link) to a file or a folder, you can do it using the **PROCshortcut** routine listed below. You would call the routine using code similar to the following: |
| + | |||
| + | <code bb4w> | ||
| PROCshortcut(" | PROCshortcut(" | ||
| \ " | \ " | ||
| \ " | \ " | ||
| \ "Test shortcut created by BBC BASIC for Windows" | \ "Test shortcut created by BBC BASIC for Windows" | ||
| - | The first parameter is the path and filename of the shortcut to be created; it must have the extension **" | + | </ |
| + | |||
| + | The first parameter is the path and filename of the shortcut to be created; it must have the extension **" | ||
| + | |||
| + | <code bb4w> | ||
| CSIDL_DESKTOPDIRECTORY = 16 | CSIDL_DESKTOPDIRECTORY = 16 | ||
| CSIDL_PROGRAM_FILES = 38 | CSIDL_PROGRAM_FILES = 38 | ||
| Line 13: | Line 19: | ||
| start$ = FNspecialfolder(CSIDL_PROGRAM_FILES) + "BBC BASIC for Windows\Examples\" | start$ = FNspecialfolder(CSIDL_PROGRAM_FILES) + "BBC BASIC for Windows\Examples\" | ||
| PROCshortcut(link$, | PROCshortcut(link$, | ||
| - | To make the shortcut available to all users rather than just the current user change **CSIDL_DESKTOPDIRECTORY** to **CSIDL_COMMON_DESKTOPDIRECTORY**.\\ \\ Here is the **PROCshortcut** routine itself:\\ | + | </ |
| + | |||
| + | To make the shortcut available to all users rather than just the current user change **CSIDL_DESKTOPDIRECTORY** to **CSIDL_COMMON_DESKTOPDIRECTORY**.\\ \\ Here is the **PROCshortcut** routine itself: | ||
| + | |||
| + | <code bb4w> | ||
| REM PROCshortcut - uses the Shell' | REM PROCshortcut - uses the Shell' | ||
| REM to create and store a shortcut to the specified object. | REM to create and store a shortcut to the specified object. | ||
| Line 85: | Line 95: | ||
| SYS `CoUninitialize` | SYS `CoUninitialize` | ||
| ENDPROC | ENDPROC | ||
| + | </ | ||
| + | |||
| For information about how to read (dereference) a short cut see the article on [[/ | For information about how to read (dereference) a short cut see the article on [[/ | ||
creating_20a_20shortcut.1522502353.txt.gz · Last modified: 2024/01/05 00:18 (external edit)