accessing_20the_20shell_20clipboard
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| accessing_20the_20shell_20clipboard [2018/03/31 13:19] – external edit 127.0.0.1 | accessing_20the_20shell_20clipboard [2024/01/05 00:22] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 2: | Line 2: | ||
| //by Richard Russell, October 2010//\\ \\ **Windows Explorer** lets you copy files from one place in the filesystem to another (e.g. from one folder to another, or from one drive to another) by means of **Copy** and **Paste** operations, analogous to how you might copy-and-paste text from one document to another. This article describes how you can access the **Shell Clipboard** from your BASIC program, so you can **paste** files that have been copied in Windows Explorer, or **copy** files that can then be pasted in Windows Explorer.\\ \\ **Pasting** files from the Shell Clipboard uses a similar mechanism to that described in the article [[/ | //by Richard Russell, October 2010//\\ \\ **Windows Explorer** lets you copy files from one place in the filesystem to another (e.g. from one folder to another, or from one drive to another) by means of **Copy** and **Paste** operations, analogous to how you might copy-and-paste text from one document to another. This article describes how you can access the **Shell Clipboard** from your BASIC program, so you can **paste** files that have been copied in Windows Explorer, or **copy** files that can then be pasted in Windows Explorer.\\ \\ **Pasting** files from the Shell Clipboard uses a similar mechanism to that described in the article [[/ | ||
| + | <code bb4w> | ||
| CF_HDROP = 15 | CF_HDROP = 15 | ||
| MAX_PATH = 260 | MAX_PATH = 260 | ||
| Line 25: | Line 26: | ||
| SYS " | SYS " | ||
| ENDIF | ENDIF | ||
| + | </ | ||
| Here the filenames are simply printed to the screen. In practice you are likely to want to copy the files and/or to access their contents.\\ \\ **Copying** files to the Shell Clipboard is slightly more involved, because you have to build the necessary data structure yourself. The code to do it is listed below; for convenience it uses the **FNselectfiles** function, to be found in the article [[/ | Here the filenames are simply printed to the screen. In practice you are likely to want to copy the files and/or to access their contents.\\ \\ **Copying** files to the Shell Clipboard is slightly more involved, because you have to build the necessary data structure yourself. The code to do it is listed below; for convenience it uses the **FNselectfiles** function, to be found in the article [[/ | ||
| + | <code bb4w> | ||
| CF_HDROP = 15 | CF_HDROP = 15 | ||
| GMEM_ZEROINIT = &40 | GMEM_ZEROINIT = &40 | ||
| Line 52: | Line 55: | ||
| SYS " | SYS " | ||
| ENDIF | ENDIF | ||
| + | </ | ||
accessing_20the_20shell_20clipboard.1522502343.txt.gz · Last modified: 2024/01/05 00:18 (external edit)