Last active
November 5, 2016 16:32
-
-
Save unforswearing/6db06eeff304a4e96d87 to your computer and use it in GitHub Desktop.
passing osascript variables to shell scripts
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
# documenting because it took a while to figure out | |
function dialogbox () { | |
osascript <<EOT | |
tell application "Finder" | |
activate | |
set nameentry to text returned of (display dialog "Hello, what is your name?" default answer "") | |
end tell | |
EOT | |
} | |
yourname=$(dialogbox) | |
echo "the name that was entered was "$yourname"" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment