microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
111.37k stars 6.56k forks source link

Custom Typescript Workflow Integration #7667

Closed njreid closed 4 years ago

njreid commented 4 years ago

PowerToys is increasingly adding most of the functionality that people want to automate with Windows desktop scripting systems like AutoHotKey - running apps, moving windows, binding hotkeys to actions.

AHK is powerful, but the scripting syntax and dev tools are prehistoric.

What about integrating Deno (with it's smaller-than-nodejs size and native Typescript capabilities) into PowerToys to allow people to dream up new window placement arrangements, or app execution workflows?

Ideally all current and future PowerToys functions would be exposed as nicely documented Typescript APIs.

If you'd like to see this feature implemented, add a 👍 reaction to this post.

ghost commented 4 years ago

Why only just TypeScript APIs? We could use Web Sockets like OBS Studio. Look at this repo. It uses OBS Web Sockets to change the scene when you go to the next slide in PowerPoint. A similar thing could be implemented in PowerToys

njreid commented 4 years ago

I suggested Typescript because MSFT ❤️ TS and the Javascript ecosystem is something close to the "world's scripting language" . (Python being the other major contender).

But, I like your idea of websockets. I took you to mean that PowerToys could standardize a JSON/websockets protocol for desktop automation tasks? So that folks could write automation scripts in whatever language they choose? I would still want it to be simple to register handlers that listened for events on that bus (eg key shortcut triggers, window snap events,)

On Thu, Oct 29, 2020, 21:00 Alan Ninan Thomas notifications@github.com wrote:

Why only just TypeScript APIs? We could use Web Sockets like OBS Studio. Look at this repo https://github.com/shanselman/PowerPointToOBSSceneSwitcher. It uses OBS Web Sockets to change the scene when you go to the next slide in PowerPoint. A similar thing could be implemented in PowerToys

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/microsoft/PowerToys/issues/7667#issuecomment-719157455, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABI2EP6D2MEIHRBEOALHR2TSNI27NANCNFSM4TEQGAPQ .

ghost commented 4 years ago

We could write libraries for this thing! :)

ghost commented 4 years ago

Yes, MSFT ❤️ TypeScript. But also MSFT ❤️ C#, Python and all others.

NekoGryphou commented 4 years ago

This kind of thing can be a huge source of security flaws, I'm not a big fan... Something module-based like Power Automate of MS would be more appropriate.

ghost commented 4 years ago

A PowerToys localhost server kind of thing seems to appropriate. WSL and Remote Development extension uses a similar kind of thing. So it might be secure. As for Power Automate, not everyone uses Power Automate and Developers mainly use programming languages. localhost server kind of thing will allow to them to access the "PowerToys API" to automate their workflow in the language that they like.

crutkas commented 4 years ago

This is a more targeted version of #112, lets track this there