<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8"> <title>LiveCode Simple Calendar / LiveCodeのシンプル・カレンダープログラミング</title> <style media="screen" type="text/css"> a:link {color: #333; } a:visited {color: #333; } a:hover {color: #999; } a:active {color: #999; } .bodyS { color: #333; font-size: 11px; font-family: SunSans-Regular, sans-serif; line-height: 14px } .calendarMac { color: black; font-size: 12px; font-family: Monaco; line-height: 18px } .calendar { color: black; font-size: 13px; font-family: monospace; line-height: 18px } #container{ position: relative; margin: 0 auto; /* center on everything else */ text-align: left; width: 200px; } </style> </head> <?rev include "script.irev" ?> <body> <span class="bodyS"> <b>LiveCodeのカレンダープログラミング</b><br> <a href="index.irev?file=index.irev">LiveCodeのプログラミングを見る</a><br> <a href="http://kenjikojima.com/calendar/bees/" target="_blank">"Save the Bees Calendar"</a>インターラクティブ<br> <a href="http://downloads.livecode.com/livecode/">LiveCode Community Server</a>が必要です。<br> </span> <?rev --// OSに合ったフォントを設定 //-- get $_SERVER["HTTP_USER_AGENT"] if it contains "Macintosh" then put "calendarMac" into calFont else put "calendar" into calFont end if put "<div class=" "e& calFont "e& " id='container'>" --// "e& はアンド・クオート・アンド //-- --// フォント設定終わり //-- --// カレンダーのプログラムはここから //-- put the date into tDate --// 今日の月日年を取得 11/15/14 //-- set itemDel to "/" put "cal " & item 1 of tDate && "20" & item 3 of tDate into tScript --// tScriptには「cal」と月と年号が入る 上のコメントの年月では「cal 11 2014」 //-- put shell(tScript) into tMonthCal --// ユニックス・コマンドでカレンダーを取得してtMonthCalに入れる //-- replace cr with "<br/>" in tMonthCal --// 行変えをhtml用に書き換え //-- replace space with " " in tMonthCal --// スペースをhtml用に書き換え"& n b s p ;" //-- put tMonthCal --// カレンダーを書き出し //-- --// カレンダーのプログラムはここまで //-- ?> </div> </body> </html>