Node.js JavaScript: Simulate Keypress on Server (Like a Macro) -


I have a keypress, such as a node to simulate the up arrow or button. I am trying to get a JS script. Specifically, I am trying to create a clone basically, whenever a command (top, bottom, left, right, A, B, selection, start) is sent through the IRC, then the server is a keypress So far, I have written it for node.js with IRC module:

  var config = {channel: ["#trron"], which is the symbol of the gameboy emulator in turn, ], Server: "irc.freenode.net", botName: "voyote"}; Var IRC = Requirement ("IRC"); Var bot = new irc.Client (config.server, config.botName, {channels: config.channels}); Var command handler = function (from, text) {if (text.toLowerCase () === "up" || text.toLowerCase () === "bottom" || text.toLowerCase () === "left" | Text.toLowerCase () === "Correct" || text.toLowerCase () === "One" || text.toLowerCase () === "B" || text.toLowerCase () === " Select "Text.toLowerCase () ===" Start ") {bot.say (config.channels [0], from.toUpperCase () +" sent "+ text.toUpperCase () +" command! "); } Else {bot.say (config.channels [0], from.toUpperCase () + ", this was not a valid order!"); }}; Bot.addListener ("Message", Function (from, Text, Message) {commandHandler (from, Text);});  

To run my script, I type node scriptName.js at the command prompt. I'm using Windows 7.

This connects to the freenode channel #tron , which I'm using for testing purposes, because it seems mainly inactive When one user inputs one of the inputs, then it sends a message like "NIAMED sent left command!", Otherwise it sends "NIMAID", it was not a valid order! "Anyway, it works flawlessly. So, whatever I have to do, I find a way to send a keypress and the last script is just a switch statement away.

The problem is that the node I can find a reference by using Internet Talking about using .Js in a browser environment, with JQuery or something similar. I need to send compressors for an emulator.

tldr: me Windows 7 The application that runs on the server is required to send compressors to a node. JS script.

Is there any way to do this?

I am working on cross platform Node.js module and it is coming great with you! So far you can move keystroke, type string, mouse And click, and remove the color of a pixel.


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -