Dear Home Owner, このページをアンテナに追加 RSSフィード

 | 

2007-04-10

Twittering from AppleScript  Twittering from AppleScript - Dear Home Owner, を含むブックマーク はてなブックマーク -  Twittering from AppleScript - Dear Home Owner,  Twittering from AppleScript - Dear Home Owner, のブックマークコメント

inspired by http://blog.codahale.com/2007/01/15/tweet-twitter-quicksilver/

set input to (display dialog "What are you doing?" buttons {"Cancel", "Update"} default button 2 default answer "")
if button returned of input = "Update" then
	set status to text returned of input
	tell application "Keychain Scripting"
		set twitter_key to first Internet key of current keychain whose server is "twitter.com"
		set twitter_login to quoted form of (account of twitter_key & ":" & password of twitter_key)
	end tell
	set twitter_status to quoted form of ("status=" & status)
	set results to do shell script "curl --user " & twitter_login & " --data-binary " & twitter_status & " http://twitter.com/statuses/update.json"
end if

example: force twittering in every 30 minutes

crontab -e

*/30 * * * * open ~/Application/twitter.app
トラックバック - http://subtech.g.hatena.ne.jp/youpy/20070410
 |