Libraryless. Click here for Pure Java version (1939L/14K/42K).
1 | !747 |
2 | !1000805 // awt |
3 | !image classes |
4 | |
5 | m {
|
6 | !include #1001425 // ShowBigText |
7 | |
8 | static S os; |
9 | static boolean wtf; |
10 | |
11 | p {
|
12 | readLocally("os");
|
13 | new ShowBigText sbt; |
14 | sbt.title = "OS Sensor"; |
15 | if (os != null) sbt.showText(os + "!"); |
16 | |
17 | while (true) {
|
18 | S theOS = getOS(); |
19 | if (os != null && !eq(os, theOS)) {
|
20 | for (int i = 0; i < 3; i++) {
|
21 | wtf = true; |
22 | sbt.showText("WTF!");
|
23 | sleepSeconds(1); |
24 | sbt.showText(os + "!"); |
25 | sleepSeconds(1); |
26 | sbt.showText(theOS + "!"); |
27 | sleepSeconds(1); |
28 | } |
29 | wtf = false; |
30 | } |
31 | |
32 | if (!eq(os, theOS)) {
|
33 | os = theOS; |
34 | saveLocally("os");
|
35 | sbt.showText(os + "!"); |
36 | } |
37 | |
38 | sleepSeconds(5); |
39 | } |
40 | } |
41 | |
42 | static S getOS() {
|
43 | if (isAndroid()) ret "Android"; |
44 | if (isMac()) ret "Mac OS"; |
45 | if (isWindows()) ret "Windows"; |
46 | ret "Linux"; // Everything else is Linux... Yeah it's generous :) |
47 | } |
48 | } |
Began life as a copy of #1001464
download show line numbers debug dex old transpilations
Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, dhtvkmknsjym, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1001468 |
| Snippet name: | OS Sensor 2: OS Sensor with Memory |
| Eternal ID of this version: | #1001468/1 |
| Text MD5: | 560fa4593d6fdf11ef8b81dbdb56a6e7 |
| Transpilation MD5: | cec0e8e61a8a5347fb4fe7411c593c70 |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX source code |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2015-10-17 15:08:58 |
| Source code size: | 1031 bytes / 48 lines |
| Pitched / IR pitched: | No / Yes |
| Views / Downloads: | 739 / 1474 |
| Referenced in: | [show references] |