Hi fellow wiki editors!

To help newly registered users get more familiar with the wiki (and maybe older users too) there is now a {{Welcome to the wiki}} template. Have a look at it and feel free to add it to new users discussion pages (and perhaps your own).

I have tried to keep the template short, but meaningful. /Johan G


Jump to: navigation, search

Nasal library/clipboard

1,054 bytes added, 13:05, 27 April 2018
Doc setText()
=== setText() ===
{{Nasal doc
|syntax = clipboard.setText(text[, type]);
|source = {{flightgear source|src/Scripting/NasalClipboard.cxx|l=54|t=Source}}
|text = Sets the contents of the clipboard. If the operation is successful, 1 (true) is returned, otherwise 0 (false) is returned.
|param1 = text
|param1text = A string that will be put into the clipboard.
|param2 = type
|param2text = Optional argument that specifies into which part of the clipboard the text should be put. If <code>clipboard.CLIPBOARD</code> (the default) is given, it will go to the normal clipboard. If <code>clipboard.SELECTION</code> is given, the text will be added to the selection buffer. Note that only X11 systems properly implement <code>clipboard.SELECTION</code>, but this argument may still be used with <code>[[#setText()|setText()]]</code> (see example 2).
|example1 = clipboard.setText("Demo");
print("'", clipboard.getText(), "'"); # prints 'Demo'
|example2 = clipboard.setText("Demo", clipboard.SELECTION);
print("'", clipboard.getText(clipboard.SELECTION), "'"); # prints 'Demo'
== Constants ==

Navigation menu