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).

1  
!7
2  
3  
static double sleepTime = 30; // Check every 30 seconds
4  
static int factor = 1; // Speak every <factor> visitors
5  
static int n = -1;
6  
7  
p-repeat with sleep sleepTime {
8  
  int cookies = ai1_cookiesToday_int();
9  
  printWithTime("Visitors: " + cookies);
10  
  renameConsole(n(cookies, "visitors") + " - " + programTitle());
11  
  if (n < 0 || cookies/factor > n/factor) {
12  
    n = cookies;
13  
    sayInEnglish("You have " + n(n, "visitors"));
14  
  }
15  
}

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: 699 / 891
Version history: 3 change(s)
Referenced in: [show references]