開発作業中のスクリプト。
現在は月の輝面比を取得するところまで。
命令はこれからX10デバイスに移行していく。
appleScript for controling x10 device-beta ver.
-
- (not yet 未処理)downloading in each 5 or10sec 5から10秒ごとのダウンロード作業
set theTMPfile to ((path to desktop) as text) & "|TMP|.html"
-
- "http://www.moonsystem.to/checkup2.cgi?mode=now" よりデータをダウンロード
- "|TMP|.html"に格納
tell application "URL Access Scripting"
download "http://www.moonsystem.to/checkup2.cgi?mode=now" to file theTMPfile replacing yes
end tell
-
- theTMPfileより、Tanaka's OSAXを使用してhtmlのデリミターでリストに切りわけ
- 今回の目的であるtheBLITElistを取得!
set {theYURIlist, theNolist, theAGElist, theNo2list, theIMGlist, theNo3list, thePLACElist, theNo4list, theBLITElist} to (items 4 thru 12 of (tokenize (read file theTMPfile) with delimiters {"", "
display dialog theBLITElist
-
- other lists use in the future.
-
- send(theBLITElist)to Thinking Home に送るのだ!!
- theBLITElistの数値は is like(56.607%)のように小数点以下三桁が5秒ごとに変動するので、
- so i put an integer part of theBLITElist to control desktop lamp.
- 大まかな整数部分をまず電気スタンドに送って、その後細かい数字の変化をどのように扱うか、がポイントになってくる。
- i am not thining about the treatment of the down to three places of decimals data.
- my plan is to put the data in other interfaces like speaker; make melody with using director.
-
- Thinking Home のランプの明るさのコントロール変数は整数部分しか扱わない。