Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

18
LINES

< > BotCompany Repo | #1023373 // Key Robot Web Server

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 911K of libraries. Click here for Pure Java version (4446L/27K).

!7

cmodule KeyRobotWebServer > DynPrintLog {
  switchable int httpPort = 8083;
  
  start-thread {
    dm_serveHttpFromFunction(httpPort, func(S uri, SS params) {
      assertTrue(isLocalhost(getClientIP()));
      
      if (eq(uri, "/type")) {
        robot_keyPressAndRelease(parseInt(params.get('keycode)));
        ret "OK";
      }

      ret "what";
    });
  }
}

Author comment

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: 207 / 344
Version history: 2 change(s)
Referenced in: [show references]