Libraryless. Click here for Pure Java version (3232L/22K/74K).
!752 p { new StringReceiver receiver; // inject to all VMs inject(receiver, [[ for (JFrame f : allFrames()) { L<JList> lists = findAll(f, JList.class); if (l(lists) == 2) { print("Yes! " + f.getTitle()); receiver.add(weakref(f)); } } ]]); print("Frames found: " + structure(receiver.list)); } static void inject(StringReceiver receiver, S code) { // change "receiver.add(" to "sendToLocalBot({port}, ..." L<S> tok = javaTok(code); jreplace(tok, "receiver.add(", "sendToLocalBot(" + receiver.android.port + "," + quote("please receive *") + ", "); code = join(tok); // make & transpile program S program = run752("p {\n" + code + "\n}"); S programID = createTempProgram(program, "Temp program by " + formatSnippetID(getProgramID())); // inject to VMs L<Injection> injections = injectToAll(programID); // wait until injections ended waitUntilInjectionsDone(injections); // release injections (TODO) // shut down receiver receiver.android.dispose(); } static class StringReceiver { L<S> list = synchroList(); Android3 android; *() { android = new Android3("String Receiver."); android.responder = new Responder() { S answer(S s, L<S> history) { new Matches m; if (match3("please receive *", s, m)) { list.add(m.unq(0)); ret "OK."; } ret null; } }; android.useMultiPort = false; makeAndroid3(android); } }
download show line numbers debug dex old transpilations
Travelled to 16 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, ddnzoavkxhuk, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, teubizvjbppd, tslmcundralx, tvejysmllsmz, vouqrxazstgt
ID | Author/Program | Comment | Date |
---|---|---|---|
1161 | stefan | It has to transpile the program in every VM... will be optimized in new translation architecture. | 2015-11-01 13:33:30 |