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

19
LINES

< > BotCompany Repo | #1005885 // Recognize Slack using ShootLoop [WORKS]

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

Libraryless. Click here for Pure Java version (3065L/20K/67K).

!752

static bool onSlack;

p {
  new ShootLoop {
    void recognize {
      // Two versions for different browsers (Opera/Firefox display differently for whatever reason)
      onSlack = hasImageOnScreen("#1005832") || hasImageOnScreen("#1005833");
    }
    
    void printState(long time) {
      done_always(time, onSlack
        ? "You're on Slack!"
        : "Slack window not visible.");
      setConsoleIcon(onSlack ? "#1005832" : "#1005834");
    }
  }.run();
}

Author comment

Began life as a copy of #1005831

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: #1005885
Snippet name: Recognize Slack using ShootLoop [WORKS]
Eternal ID of this version: #1005885/1
Text MD5: c9d83df8f5978c7ebd992f9766196206
Transpilation MD5: 3fd1901c6c95a4c27148f011a536994c
Author: stefan
Category: javax / ocr
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2016-12-12 14:37:53
Source code size: 488 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 563 / 625
Referenced in: [show references]