Skip to content

Instantly share code, notes, and snippets.

@geoffrepoli
Last active February 22, 2018 19:37
Show Gist options
  • Save geoffrepoli/4bb378ad2d874b40ae5bfb15d590b1e7 to your computer and use it in GitHub Desktop.
Save geoffrepoli/4bb378ad2d874b40ae5bfb15d590b1e7 to your computer and use it in GitHub Desktop.
applescript window dialog
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