tell app "Adium" set theContact to {"ICQ.123456/234567", "Jabber.me@jabber.org/them@jabber.org", "MSN.me@hotmail.com/them@hotmail.com"} set rubyScript to " require \"Time\" log_path = \"#{ENV['HOME']}/Library/Application Support/Adium 2.0/Users/Default/Logs\"; date = Time.now.strftime(\"%Y-%m-%d\"); ARGV.map do |friend| # Get today's logs for contact Dir[\"#{log_path}/#{friend}/*(#{date}).html\"].first end.compact.each do |file| # Scan last message from each log for URLs last_message = File.open(file).readlines.last next if last_message.match(/^