将iChat状态设置为“最近”最后一个.fm轨道
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了将iChat状态设置为“最近”最后一个.fm轨道相关的知识,希望对你有一定的参考价值。
#!/usr/bin/env ruby # # Update iChat/Adium status from Twitter # # Michael Tyson # http://michael.tyson.id.au # Set Twitter username here Username = 'yourUsername' require 'net/http' require 'rexml/document' # Download timeline XML and extract latest entry xml_data = Net::HTTP.get_response(URI.parse(url)).body doc = REXML::Document.new(xml_data) latest = doc.root.elements['channel/item/title'] message = '♫ ' + latest.text.gsub(/^[^:]+:\s*/, '') exit if ! message # Apply to status script = 'set message to "' + message.gsub(/"/, '\\"') + "\"\n" + 'tell application "System Events"' + "\n" + 'if exists process "iChat" then tell application "iChat" to set the status message to message' + "\n" + 'if exists process "Adium" then tell application "Adium" to set status message of every account to message' + "\n" + 'end tell' + "\n" IO.popen("osascript", "w") { |f| f.puts(script) }
以上是关于将iChat状态设置为“最近”最后一个.fm轨道的主要内容,如果未能解决你的问题,请参考以下文章
无法将 UISlider 的轨道色调设置为“绝对”clearColor
使用 localhost ejabberd 设置 ichat 消息应用程序