Uses 911K of libraries. Click here for Pure Java version (4446L/27K).
1 | !7 |
2 | |
3 | cmodule KeyRobotWebServer > DynPrintLog { |
4 | switchable int httpPort = 8083; |
5 | |
6 | start-thread { |
7 | dm_serveHttpFromFunction(httpPort, func(S uri, SS params) { |
8 | assertTrue(isLocalhost(getClientIP())); |
9 | |
10 | if (eq(uri, "/type")) { |
11 | robot_keyPressAndRelease(parseInt(params.get('keycode))); |
12 | ret "OK"; |
13 | } |
14 | |
15 | ret "what"; |
16 | }); |
17 | } |
18 | } |
Began life as a copy of #1023335
download show line numbers debug dex old transpilations
Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1023373 |
Snippet name: | Key Robot Web Server |
Eternal ID of this version: | #1023373/3 |
Text MD5: | 416e746cc37f7560e7c359eb03b0ac57 |
Transpilation MD5: | d16b9133b6cfc7526deb7c759c72757d |
Author: | stefan |
Category: | javax / automation |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-06-11 17:02:28 |
Source code size: | 388 bytes / 18 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 312 / 457 |
Version history: | 2 change(s) |
Referenced in: | [show references] |