Wait for Keyboard Input = "Return" key press
Hi,
Is it possible to wait for a specific key press, like the "return" key?
Need it for "wait till password is entered" to proceed.
Thank!
- Dustin Harris @Dustin_Harris
I’m not sure SoundFlow can hook a keyboard command like that, but you can have it recognize the window you’re entering the password in and continue when that window is closed. Does that help?
Ingo Pusswald @ingo_luftrausch
Thanks Dustin,
its for entering Terminal command lines one after another. I couldn't find any UI element nor menu item that can be used as triggers for SF.I tried to modify “Wait for Streamdeck button” but failed.
Dustin Harris @Dustin_Harris
You could get the password as a variable from a prompt then pass that into the terminal command?
let pwd = prompt(‘Please Enter Your Password’)
Ingo Pusswald @ingo_luftrausch
Hm,
I want to publish that package and I don't wanna mess around with admin passwords....
Its about renice for Pro Tools and caffeinate:
Launch ProTools
Launch Terminal
Get pid of ProTools
Enter renice command into Terminal with pid
-> and now the AdminPW is required....Afterwards I want to apply caffeinate -I and -D for HDDs and Displays
So when you launch ProTools with this Command you get all the power of your system it can provide, no matter what...
Christian Scheuer @chrscheuer2020-11-30 16:11:27.047Z
Generally, SF shouldn't be used for automating password entry, as it's inherently insecure.
What you can do instead is to use your macOS Keychain. Make a login item, and then use Terminal commands to read that password inline in the command. I found some tutorials on how to do this online a while back for some different automation.
But the gist is – keep the password stuff out of SF if you can.Dustin Harris @Dustin_Harris
Oh that is super cool...
- In reply toingo_luftrausch⬆:Dustin Harris @Dustin_Harris
Maybe someone else will chime in with another idea, but the only way I can think of doing it is getting the password as a variable and passing that onto a
system.exec({})
method to run the terminal command. But I admittedly a JavaScript beginner :)Ingo Pusswald @ingo_luftrausch
I did use your suggestion, and its working!
The first version of the package is in the store. Would be nice to get your feedback! (Search for luftrausch)