Created
October 14, 2013 22:05
-
-
Save dinge/6983008 to your computer and use it in GitHub Desktop.
calling applescript from ruby
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
def osascript(script) | |
system 'osascript', *script.split(/\n/).map { |line| ['-e', line] }.flatten | |
end | |
osascript <<-END | |
tell application "Finder" | |
display dialog "Hello" | |
end tell | |
END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment