Last active
February 22, 2018 19:37
-
-
Save geoffrepoli/4bb378ad2d874b40ae5bfb15d590b1e7 to your computer and use it in GitHub Desktop.
applescript window dialog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getUserInput() | |
{ | |
launchctl asuser $(stat -f %u /dev/console) osascript <<-APPLESCRIPT | |
tell app "System Events" | |
text returned of (display dialog "$1" default answer "" buttons {"OK"} default button 1) | |
end tell | |
APPLESCRIPT | |
} | |
var=$(getUserInput "type string:") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment