Skip to content

Instantly share code, notes, and snippets.

@pdxmph
Created September 10, 2015 21:23
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 pdxmph/d98272c16efde4d3485f to your computer and use it in GitHub Desktop.
Save pdxmph/d98272c16efde4d3485f to your computer and use it in GitHub Desktop.
Set Adium away message to now + 10 minutes so I can go for a walk around the park.
#!/usr/bin/env ruby
require "rubygems"
require "appscript"
require "active_support/all"
include Appscript
adium = app("Adium")
time = Time.current + 10.minutes
back = time.strftime("%l:%M")
status_message = "afk: Back by #{back}"
puts status_message
adium.accounts.get.each do |a|
a.go_away(:with_message => status_message)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment