/ Published in: Ruby

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
SUPPORT = ENV['TM_SUPPORT_PATH'] DIALOG = ENV['DIALOG'] require SUPPORT + '/lib/escape' require SUPPORT + '/lib/osx/plist' title = "My Alert" message = "This is my alert Box" buttons = ['OK', 'Close'] params = { 'alertStyle' => 'informational', 'messageTitle' => title, 'informativeText' => message, 'buttonTitles' => buttons } opts = params.to_plist puts `#{e_sh(DIALOG)} -ep #{e_sh(opts)}`
Comments
