macで地デジ

3800円にてオークソンのピクセラのチューナーが今日届いたので

  • CaptyTV Hi-Vision(PIX-DT141-PU0)

いろいろしてみて型落ちのやつなので予約録画ができても視聴予約ができないもんだから
無理くりStationTV LEのチャンネルメニューをapplescriptで操作するよ。

on run argv
	
	set channel to item 1 of argv as string
	if channel is "tbs" then
		set NUM to "TBS"
	else if channel is "etv" then
		set NUM to "NHK教育・東京"
	else if channel is "nhk" then
		set NUM to "NHK総合・東京"
	else if channel is "tvk" then
		set NUM to "TVK"
	else if channel is "ntv" then
		set NUM to "日本テレビ"
	else if channel is "anb" then
		set NUM to "テレビ朝日"
	else if channel is "tvt" then
		set NUM to "テレビ東京"
	else if channel is "fnn" then
		set NUM to "フジテレビジョン"
	end if
	
	
	tell application "StationTV LE"
		activate
	end tell
	
	tell application "System Events"
		tell process "StationTV LE"
			tell menu bar 1
				tell menu bar item "選局"
					tell menu "選局"
						pick menu item NUM
					end tell
				end tell
			end tell
		end tell
	end tell
	
	tell application "Terminal"
		activate
	end tell
	
	return NUM
end run

set x to "hogehoge" //変数代入
pick menu item NUM //メニューをクリック的な
item 1 of argv //コマンドラインからの引数
argv使うときはrun handler必須らしいです。そこに引っかかりました。

参考サイト

あとEvernotehelperとかkillしないといけないようです。キャプチャ関係。

ps ax | grep -i ever