Skip to content

Instantly share code, notes, and snippets.

@dinge
Created October 14, 2013 22:05
Show Gist options
  • Select an option

  • Save dinge/6983008 to your computer and use it in GitHub Desktop.

Select an option

Save dinge/6983008 to your computer and use it in GitHub Desktop.

Revisions

  1. dinge created this gist Oct 14, 2013.
    9 changes: 9 additions & 0 deletions gistfile1
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    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