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

15
LINES

< > BotCompany Repo | #1006181 // clipboardBot

JavaX fragment (include)

static S clipboardBot(S s) {
  new Matches m;
  
  if "get clipboard" {
    S text = getTextFromClipboard();
    if (text != null)
      ret structure(ll("text", text));
    BufferedImage img = getImageFromClipboard();
    if (img != null)
      ret structure(ll("png", toPNG(img)));
    ret "empty or unknown";
  }
  
  null;
}

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1006181
Snippet name: clipboardBot
Eternal ID of this version: #1006181/1
Text MD5: d183853aef13978148995233318f45fc
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-12-22 19:15:37
Source code size: 342 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 526 / 519
Referenced in: #1006484 - screenshotBot - supply screenshots on demand to the outside
#1006654 - Standard functions list 2 (LIVE, continuation of #761)