A Node wrapper for the awesome SendKeys library by Soc Sieng.
Once you haev cloned this repo, navigate to the project folder and run the command:
npm installTo create a 'script'' or command set, add a JSON file (the name does not matter) to the command-sets directory.
The file should have a JSON structure similar to structure in command-set.json.template
{
"name": "Command Set template",
"commands": [
{
"title": "List Folder",
"string": "ls<c:return>",
"target": "terminal",
"delay": 0.1,
"initialDelay": 0.25
},
{
"title": "Clear Console",
"string": "clear<c:return>",
"target": "terminal",
"delay": 0.1,
"initialDelay": 0.25
}
]
}- The
titleproperty is the name that will appear on the web interface. - The
stringproperty contains the keystrokes you want to send. - The
targetproperty is the app that will receive the keystrokes. - The
delayproperty is the length of time in between keystrokes in seconds. - The
initialDelayproperty is how long to delay sending the keystrokes to the app in seconds.
When you have your script (command set) completed, you start the app using the following command
npm run startIf you want to monitor the folder so that Node will refresh when shcanges are made to a script, run:
npm run monitorTo use the web interface, navigate to localhost:3000
Note: If you make changes to a script while, you will need to refresh the page to see these cahnges reflected in the browser.