Hacker News new | ask | show | jobs
by Someone1234 1276 days ago
I've done a similar thing on Windows and Powershell (via Open). Only limitation is it still spawn a terminal window even if briefly (enough to mess with focus however).

powershell -WindowStyle Hidden -ExecutionPolicy Bypass -Command "& { // Command(s) }"

In particular I use it with this Powershell Script:

https://stackoverflow.com/questions/21355891/change-audio-le...

via e.g.:

"& { C:\[Path To Script]\SetVolume.ps1; [audio]::Volume = 0.4 }"

For 40% and so on.