Uses 911K of libraries. Click here for Pure Java version (3847L/18K).
1 | !7 |
2 | |
3 | compact module SendAIBar > DynPrintLog { |
4 | S sendTo; |
5 | bool enabled, fire; |
6 | |
7 | start { |
8 | dm_onTopInputChange(voidfunc(fS s) { |
9 | if (!enabled || fire) ret; |
10 | final LS ids = aggressivelyCollectPossibleComputerIDs(sendTo); |
11 | if (empty(ids)) ret; |
12 | switch to q(); |
13 | print("Sending: " + s); |
14 | for (S computerID : ids) |
15 | dm_privateChat_evalOnOtherMachine(computerID, "dm_setAIBarText(" + quote(s) + ");"); |
16 | }); |
17 | |
18 | dm_onTopInput(voidfunc(fS s) { |
19 | if (!enabled || !fire) ret; |
20 | final LS ids = aggressivelyCollectPossibleComputerIDs(sendTo); |
21 | if (empty(ids)) ret; |
22 | switch to q(); |
23 | print("Sending: " + s); |
24 | for (S computerID : ids) |
25 | dm_privateChat_evalOnOtherMachine(computerID, "dm_setAIBarTextAndFire(" + quote(s) + ");"); |
26 | }); |
27 | } |
28 | |
29 | visualize { |
30 | ret centerAndSouthWithMargins(super.visualize(), |
31 | centerAndEast(withLabel("Send to:", |
32 | withToolTip("One or more computer IDs (use commas to separate)", dm_fieldTextField('sendTo))), hstackWithSpacing( |
33 | dm_fieldCheckBox('enabled), |
34 | dm_fieldCheckBox('fire)))); |
35 | } |
36 | } |
download show line numbers debug dex old transpilations
Travelled to 11 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1019658 |
Snippet name: | Send AI Bar To Other Machine(s) |
Eternal ID of this version: | #1019658/13 |
Text MD5: | ae367bf5100ad0545786f26ebf26e4e2 |
Transpilation MD5: | ab63a1a26b05bed13e17283298a6b7e6 |
Author: | stefan |
Category: | javax / stefan's os |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-01-03 03:19:21 |
Source code size: | 1157 bytes / 36 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 316 / 4712 |
Version history: | 12 change(s) |
Referenced in: | [show references] |