Skip to content

Instantly share code, notes, and snippets.

@rf-
Created October 31, 2011 06:21
Show Gist options
  • Save rf-/1327003 to your computer and use it in GitHub Desktop.
Save rf-/1327003 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
result = `/usr/bin/osascript <<EOT
tell application "Terminal"
activate
set Input to display dialog "Gimme some 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