!7 compact module SendAIBar > DynPrintLog { S sendTo; bool enabled, fire; start { dm_onTopInputChange(voidfunc(fS s) { if (!enabled || fire) ret; final LS ids = aggressivelyCollectPossibleComputerIDs(sendTo); if (empty(ids)) ret; switch to q(); print("Sending: " + s); for (S computerID : ids) dm_privateChat_evalOnOtherMachine(computerID, "dm_setAIBarText(" + quote(s) + ");"); }); dm_onTopInput(voidfunc(fS s) { if (!enabled || !fire) ret; final LS ids = aggressivelyCollectPossibleComputerIDs(sendTo); if (empty(ids)) ret; switch to q(); print("Sending: " + s); for (S computerID : ids) dm_privateChat_evalOnOtherMachine(computerID, "dm_setAIBarTextAndFire(" + quote(s) + ");"); }); } visualize { ret centerAndSouthWithMargins(super.visualize(), centerAndEast(withLabel("Send to:", withToolTip("One or more computer IDs (use commas to separate)", dm_fieldTextField('sendTo))), hstackWithSpacing( dm_fieldCheckBox('enabled), dm_fieldCheckBox('fire)))); } }