AppleScriptで「ぷれいんぐなう」「みてる」

Safari

  • みてる。
tell application "Safari"
	tell front document
		set str to "みてる。 RT " & name & " " & URL
	end tell
	--set the clipboard to str
	open location "http://twitter.com/home/?status=" & str
end tell
    • 参考appbankのソース
javascript:var%20tid='appbank',d=document,w=window,l=location,e=encodeURIComponent,t=(d.selection)?d.selection.createRange().text:(w.getSelection)?w.getSelection():(d.getSelection)?d.getSelection():'',f='http://twitter.com/home/?status=+RT+%40'+e(tid)+':+%22'+e(d.title)+'%22+'+e(l.href);if(!w.open(f,'retweet'))l.href=f;void(0);

iTunes

  • ぷれいんぐなう
tell application "iTunes"
	set currentTrack to current track
	set theName to name of currentTrack as text
	set theArtist to artist of currentTrack as text
end tell

tell application "Safari"
	set str to "ぷれいんぐなう♪ " & theName & " / " & theArtist
	open location "http://twitter.com/home/?status=" & str
end tell
  • 再生してないとエラーするけど気にしない