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

15
LINES

< > BotCompany Repo | #1006480 // Speak when new visitors arrive on server (Desktop/Android)

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

Libraryless. Click here for Pure Java version (5299L/35K/119K).

!7

static double sleepTime = 30; // Check every 30 seconds
static int factor = 1; // Speak every <factor> visitors
static int n = -1;

p-repeat with sleep sleepTime {
  int cookies = ai1_cookiesToday_int();
  printWithTime("Visitors: " + cookies);
  renameConsole(n(cookies, "visitors") + " - " + programTitle());
  if (n < 0 || cookies/factor > n/factor) {
    n = cookies;
    sayInEnglish("You have " + n(n, "visitors"));
  }
}

Author comment

Began life as a copy of #1004324

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1006480
Snippet name: Speak when new visitors arrive on server (Desktop/Android)
Eternal ID of this version: #1006480/4
Text MD5: 104524f0d3b4d76334972d4a55b56cdf
Transpilation MD5: cc5cf159fda35af4f2c921bee689d49e
Author: stefan
Category: javax / automation
Type: JavaX source code
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-03-28 22:04:56
Source code size: 445 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 697 / 889
Version history: 3 change(s)
Referenced in: [show references]