Hi @thepetercoin,
Yes it always a problem with security permissions when we need to rely on other programs,
I also don’t think you can do it in JavaScript.
i think that I tried at some point to create a script in the “Java” language (not javascript) that press the “p” key and it worked, the good thing is many computer already have java install for other programs so it may be a possible solution.
There was another user in this forum that wanted to press the letter “p”, and in my answer I tested the java method but eventually I decided to go with a PowerShell script that did it, so you don’t have to rely on java being installed,
it is a bat file that looks like this -
if "%1" == "" start "" /min "%~f0" IS_MINIMIZED && exit
powershell -Command "Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.SendKeys]::SendWait('p')"
exit
this code press the letter “p” once
Here is the original post -
So if you have enough permissions to run this PowerShell script in your workplace I think it is a good solution too.