Hey,
I don't know anything about swift but only about shell. That is why I ask here.
My plan is to make an Application where you push a button to activate this script:
I know, very simple.
But how I can I make this? Thank you.
I don't know anything about swift but only about shell. That is why I ask here.
My plan is to make an Application where you push a button to activate this script:
Code Block shell sudo pmset -b sleep 0; sudo pmset -b disablesleep 1
I know, very simple.
But how I can I make this? Thank you.
I think you’d be better off using AppleScript for this. AppleScript has three advantages here:
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"
It’s very easy to save an applet with a single function.
It’s very easy to invoke shell scripts via the do shell script command.
That command also supports trivial privilege escalation.
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"