Skip to content

Instantly share code, notes, and snippets.

@phoet
Created August 24, 2010 14:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phoet/547620 to your computer and use it in GitHub Desktop.
Save phoet/547620 to your computer and use it in GitHub Desktop.
using applescript for adium
#! /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