Macのサウンド出力先を切り替えるAppleScript
iMac用にHDMI出力コネクタを買ったのだが、音声の出力先をHDMI(外部ディスプレイ)と内蔵スピーカで切り替えたいことが良くあるので、AppleScriptにしてみた。
システム環境設定をUI操作しているので、「ユニバーサルアクセス>補助装置にアクセスできるようにする」にチェックする必要あり。AppleScriptのスクリプトメニューに登録しておくと便利かも。
環境によって、row番号やラベル文字列が違うかもしれないので、適当に修正して。
tell application "System Preferences" activate set current pane to pane id "com.apple.preference.sound" end tell tell application "System Events" tell process "System Preferences" tell tab group 1 of window "サウンド" click radio button "出力" if (selected of row 1 of table 1 of scroll area 1) then set selected of row 2 of table 1 of scroll area 1 to true else set selected of row 1 of table 1 of scroll area 1 to true end if end tell end tell end tell quit application "System Preferences"
参考:http://www.oreillynet.com/mac/blog/2006/07/applescript_audio_output_switc.html
Windows Phone
Windows Phone のゲームアプリについて話したので、スライドを貼っておきます
Windows Phone
View more presentations from sunflat
LLNagoya
LL名古屋で、AppleScriptの話をしたので、スライドを貼っておきます
LLNagoya Apple
View more presentations from sunflat
チート対策と、framework内のクラスのデバッグについて
Android用ゲームのチート対策と、Android framework内のクラスのデバッグについて話したので、スライドを貼っておきます
第3話 「チートも、隠しクラスも、あるんだよ」
View more presentations from sunflat
Objective-C (Cocoa)でIteratorパターンを実装してみた
Objective-C (Cocoa)でIteratorパターンを実装してみたので、貼っておきます。
NSEnumerator(外部Iterator)、高速列挙、Blocks の3種類の方法を実装してあります。
Androidの端末IDとActivityの話
Androidの端末IDとActivityの話をしたので、スライドとサンプルコードを貼っておきます
端末IDとActivityの話
View more presentations from sunflat
[サンプルコード] (MITライセンス)