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

17
LINES

< > BotCompany Repo | #1025115 // RandomScreenScan

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2340L/15K).

sclass RandomScreenScan {
  int w, h;
  transient Rect lastSent;
  transient int stayMax;
  
  *() {}
  *(int *w, int *h) {}
  
  Rect get(bool foundSomething) {
    ping();
    if (foundSomething && lastSent != null && stayMax++ < 10) ret lastSent;
    stayMax = 0;
    lastSent = randomScreenRect(w, h);
    print("Screen scan: " + lastSent);
    ret lastSent;
  }
}

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1025115
Snippet name: RandomScreenScan
Eternal ID of this version: #1025115/6
Text MD5: b59b2cdbfc6e14eee10952ac08028706
Transpilation MD5: f031a26179a63ddf98b9e83d35845265
Author: stefan
Category: javax / visual bots
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-05 22:35:22
Source code size: 384 bytes / 17 lines
Pitched / IR pitched: No / No
Views / Downloads: 284 / 689
Version history: 5 change(s)
Referenced in: #1034167 - Standard Classes + Interfaces (LIVE, continuation of #1003674)