2016-03-18 11:36:04 +00:00
|
|
|
{{DISPLAYTITLE:_CLIPBOARD$ (statement)}}
|
2021-02-16 01:13:07 +00:00
|
|
|
The [[_CLIPBOARD$ (statement)|_CLIPBOARD$]] statement copies the specified [[STRING]] value into the operating system's clipboard.
|
2015-08-02 12:12:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
{{PageSyntax}}
|
2017-10-10 14:55:21 +00:00
|
|
|
:[[_CLIPBOARD$ (statement)|_CLIPBOARD$]] = {{Parameter|string_expression$}}
|
2015-08-02 12:12:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
{{PageDescription}}
|
2017-10-10 14:55:21 +00:00
|
|
|
* {{Parameter|string_expression$}} is the string value to be sent to the clipboard.
|
2015-08-02 12:12:44 +00:00
|
|
|
* The string value will replace everything previously in the clipboard.
|
|
|
|
* Assemble long text into one string variable value before using this statement.
|
|
|
|
* Add CHR$(13) + CHR$(10) CRLF characters to move to a new clipboard line.
|
|
|
|
* When copying text files, end line CRLF characters 13 and 10 do not have to be added.
|
|
|
|
* Numerical values can be converted to strings using [[STR$]], [[_MK$]], [[MKI$]], [[MKL$]], [[MKS$]], [[MKD$]], [[HEX$]] or [[OCT$]].
|
|
|
|
* The clipboard can be used to copy, paste and communicate between running programs.
|
|
|
|
|
|
|
|
|
2017-10-10 14:55:21 +00:00
|
|
|
{{PageExamples}}
|
2015-08-02 12:12:44 +00:00
|
|
|
''Example:'' Set 2 lines of text in the clipboard using a carriage return to end text lines
|
|
|
|
{{CodeStart}} '' ''
|
|
|
|
{{Cl|DIM}} CrLf AS {{Cl|STRING}} * 2 'define as 2 byte STRING
|
|
|
|
CrLf = {{Cl|CHR$}}(13) + {{Cl|CHR$}}(10) 'carriage return & line feed
|
|
|
|
|
2019-04-15 01:15:33 +00:00
|
|
|
{{Cl|_CLIPBOARD$ (statement)|_CLIPBOARD$}} = "This is line 1" + CrLf + "This is line 2"
|
2015-08-02 12:12:44 +00:00
|
|
|
{{Cl|PRINT}} {{Cl|_CLIPBOARD$}} 'display what is in the clipboard
|
|
|
|
'' ''
|
|
|
|
{{CodeEnd}}
|
|
|
|
{{OutputStart}}This is line 1
|
|
|
|
|
|
|
|
This is line 2
|
|
|
|
{{OutputEnd}}
|
|
|
|
:''Note:'' The text in the clipboard could also be sent to a file using [[PRINT (file statement)|PRINT #1]] [[_CLIPBOARD$]].
|
|
|
|
|
|
|
|
|
|
|
|
{{PageSeeAlso}}
|
2017-10-10 14:55:21 +00:00
|
|
|
* [[_CLIPBOARD$]] (function)
|
|
|
|
* [[_CLIPBOARDIMAGE (function)]], [[_CLIPBOARDIMAGE]] (statement)
|
|
|
|
* [[CHR$]], [[ASCII]] (code table)
|
2015-08-02 12:12:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2019-04-15 01:15:33 +00:00
|
|
|
{{PageNavigation}}
|