set interval to 3 --- 3 秒間隔で起動されつづけ(無指定時のデフォルト) tell application "Internet Explorer" to Activate tell application "Finder" set mySelf to path to me set theComment to comment of file mySelf if theComment > 0.9 then set interval to theComment --- 1 秒未満はマズイとおもわれ。 end tell on idle naviSheet() return my interval end idle on naviSheet() tell application "Internet Explorer" do script " var bsetPrefix = 'Benriset'; var bsetScriptName = 'NaviSheet'; var bsetSuffix = 'SheetItem'; // rel 属性値の値を検索する対象要素 var bsetSearchElement = ['LINK','A']; // ナビシートに抽出するリンクタイプ(前方一致)と // リンクテキスト化したものに設定するアクセスキー var bsetLinkTypes = { Home : 'H', Top : 'T', Up : 'U', Contents : 'C', Prev : 'P', Next : 'N' }; bsetMain(); function bsetMain(){ if (!bsetIsFirstLaunch()) return; bsetDisableAuthorKey(); bsetNaviSheet(); document.onclick = bsetToggleVisibility; } function bsetDisableAuthorKey() { window.status = 'Disable author accesskey...'; OBJs = document.getElementsByTagName('*'); for (var i=0; i', j, n) var obj = OBJs.item(j); if (obj.rel && obj.rel.match(matching)) { items[type] = { href : obj.href, title : obj.title ? obj.title : obj.href, accessKey : bsetLinkTypes[type] }; } } } } window.status = 'Creating NaviSheet...'; var naviSheet = document.createElement('ul'); naviSheet.className = bsetPrefix + bsetSuffix; bsetAppendStyle(naviSheet); for (var type in items) { if (items[type].href) { var itemInner = document.createElement('a'); bsetAppendStyle(itemInner); for (var attr in items[type]) itemInner[attr] = items[type][attr]; itemInner.appendChild(document.createTextNode(type)); } else var itemInner = document.createTextNode(type); var item = document.createElement('li'); bsetAppendStyle(item); item.appendChild(itemInner); if (bsetLinkTypes[type]) item.appendChild(document.createTextNode(' [' + bsetLinkTypes[type] + ']')); naviSheet.appendChild(item); } var rootElement = document.getElementsByTagName('BODY')[0]; if (!rootElement) rootElement = document.documentElement; rootElement.appendChild(naviSheet); window.status = ''; } function bsetAppendStyle(obj){ switch(obj.tagName){ case 'UL' : with(obj.style){ margin = '0 !important'; padding = '0.5em 1.5em 0.5em 0 !important'; background = '#ffffce !important'; borderWidth = '1px !important'; borderStyle = 'solid !important'; borderColor = '#bbbbbb #999999 #999999 #bbbbbb !important'; position = 'fixed !important'; top = '2px !important'; left = '2px !important'; zIndex = '10000 !important'; width = 'auto !important'; visibility = 'visible !important'; } break; case 'LI' : with(obj.style){ display = 'inline !important'; listStyle = 'none !important'; margin = '0 0 0 1.5em !important'; padding = '0 !important'; fontSize = '10px !important'; color = 'black !important'; background = 'transparent !important'; } break; case 'A' : with(obj.style){ color = 'blue !important'; background = 'transparent !important'; fontSize = '10px !important'; fontWeight = 'normal !important'; fontStyle = 'normal !important'; textDecoration = 'underline !important'; border = 'none !important'; margin = '0 !important'; padding = '0 !important'; } break; default: break; } } function bsetIsFirstLaunch() { var bsetNSURL = 'http://www.remus.dti.ne.jp/~a-satomi/bunsyorou/MacIE5_benriSet.html'; var flagAttrName = bsetPrefix + ':' + bsetScriptName; var applyFlag = document.documentElement.getAttribute(flagAttrName); if (!applyFlag) { document.documentElement.setAttribute('xmlns:'+bsetPrefix, bsetNSURL); document.documentElement.setAttribute(flagAttrName, 'true'); return true; } else return false; } function bsetToggleVisibility() { var sheetItems = []; var isVisible; var OBJs = document.getElementsByTagName('*'); for (var i=0, n=OBJs.length; i= wholeNo) window.status = ''; } " end tell end naviSheet