Skip to content

carljnicholls/PCAutomation

Repository files navigation

Win 10 Automation

This Application takes string params to automate tasks. It can also be run in 'server' mode listening for commands from Pushbullet. The first command should be the task with any addition values following. Implemented tasks are:

  • play/pause media
  • lock desktop (win/ubuntu)
  • volume control

Run

From root

Install dependancies: npm i Build: tsc -b Test jest or npm run test Run: node .\build\src\main.js [args]

VsCode

  1. Show all commands: <ctrl + shift + p> or F1

  2. Select Tasks:Run Task

  3. Run the NPM command run-param-lock or run-param-server. These can be extended with your desired parameter.

  4. F5 This launch functionality can be edited in /.vscode/launch.json

    1. Launch w/ param server Debug with breakpoints with server parameter.
    2. vscode-jest-tests Run Jest Unit Tests with breakpoints

Params

  1. pushbullet or server This will launch a websocket server listening subscribing to Pushbullet. On pushes to pushbullet it will check for parameters and execute any command matched.
    This requires PUSHBULLET_API_KEY to be set in your .env file in the project root. You can create an API key from Pushbullet Settings under Access Tokens. You will also need to create a mechanism to push to messages to your pushbullet account. I suggest IFTT. A recipe for creating this is:

     1. If
         1. Google Assistant
         2. Say a phrase with a text ingredient  
         3. Selector command followed by a `$` for your text ingredient. e.g "PC $" or "Computer $".
     2. Then
         1. Push a note
         2. Message should be `textfield`
     3. Create
    
  2. lock Locks the user space on win, linux and mac using lock-system.

  3. volume <1-100> This command will set the volume of the current playback device to the given value.

  4. play or pause This command emulates a keyboard media button press of play or pause.

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published