Created
August 24, 2010 14:19
-
-
Save phoet/547620 to your computer and use it in GitHub Desktop.
using applescript for adium
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
#! /usr/bin/env ruby | |
users = { | |
:rubiii => 'daniel.harrington', | |
:tri => 'thilko.richter', | |
} | |
user = users[ARGV.shift.to_sym] | |
message = ARGV.join(' ') | |
script = <<EOF | |
tell application "Adium" | |
tell account id 9 | |
make new chat with contacts {contact "#{user}@sydney"} with new chat window | |
end tell | |
send chat id "Jabber.#{user}@sydney" message \"#{message}\" | |
end tell | |
EOF | |
puts "executing: #{script}" | |
puts `osascript -e '#{script}'` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment