Created
October 31, 2011 06:34
-
-
Save parolkar/1327018 to your computer and use it in GitHub Desktop.
Cute little script to help in making interactive script when STDIN is unavailable
This file contains hidden or 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
#!/usr/bin/ruby | |
result = `/usr/bin/osascript <<EOT | |
tell application "Terminal" | |
activate | |
set Input to display dialog "Enter Text:" with title "Hello" with icon 0 default answer "" buttons {"OK"} default button 1 | |
return text returned of Input as string | |
end tell | |
EOT | |
` | |
puts result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment