Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

9
LINES

< > BotCompany Repo | #1005363 - copyTextToClipboard (returns the argument)

JavaX fragment (include)

1  
import java.awt.datatransfer.StringSelection;
2  
3  
static S copyTextToClipboard(O _text) {
4  
  S text = str(_text);
5  
  StringSelection selection = new StringSelection(text);
6  
  Toolkit.getDefaultToolkit().getSystemClipboard().setContents(selection, selection);
7  
  vmBus_send('newClipboardContents, text);
8  
  ret text;
9  
}

download  show line numbers  debug dex   

Travelled to 13 computer(s): aoiabmzegqzx, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, tslmcundralx, tvejysmllsmz, xrpafgyirdlv, yanjaxplzisb

No comments. add comment

Snippet ID: #1005363
Snippet name: copyTextToClipboard (returns the argument)
Eternal ID of this version: #1005363/3
Text MD5: 1c7fc321f4a1815228bd95986d463ec4
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-01-15 22:03:50
Source code size: 317 bytes / 9 lines
Pitched / IR pitched: No / No
Views / Downloads: 334 / 343
Version history: 2 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1005363 & http://1005363.tinybrain.de