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

23
LINES

< > BotCompany Repo | #1015110 // Gather facts from things on screen [OK]

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Uses 3874K of libraries. Click here for Pure Java version (13865L/97K).

!7

static double interval = 4.0;
static Set<S> lastFacts;
static new LatestAppearance<S> factAppearance;

p-experiment-tt {
  autoRestart();
  startBotHere("Screen Segmenter.", #1015121);
  
  repeat with sleep interval {
    long time = sysNow();
    SS map = mechMap("Thing on screen => Fact");
    Set<S> factsSet = lookupAllAsCISet(map, thingsOnScreen2());
    L<S> factsList = factAppearance.recordAndSort(factsSet);
    S facts = lines(factsList);
    if (neq(factsSet, lastFacts))
      printWithAsciiHeading("FACTS", or2(facts, "-"));
    lastFacts = factsSet;
    //done2_always(time, localDateWithSeconds() + ": Found: " + list);
    consoleTitle(trim(l(factsList) + " " + first(factsList)));
  }
}

Author comment

Began life as a copy of #1010713

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1015110
Snippet name: Gather facts from things on screen [OK]
Eternal ID of this version: #1015110/10
Text MD5: a5e2a9cd1e5dd779e205c921955b5d7e
Transpilation MD5: 93a70e2e1de356ebf816ad159061db23
Author: stefan
Category: javax / ocr
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-08 15:29:21
Source code size: 731 bytes / 23 lines
Pitched / IR pitched: No / No
Views / Downloads: 284 / 798
Version history: 9 change(s)
Referenced in: [show references]