--小分けしたmsearchのインデックスファイルを、合体させるスクリプト。 --2006/11/29 ver.1 最初のバージョン。 ----------------------------- 設定開始 set sendType to "1" --0だとブラウザを使って送信。1だとブラウザを使わずに送信。 set indexSite to "http://www.aaa.bbb.jp/genindex.cgi" --genindex.cgiのURLを記述してください set conf to "■■" --パスワード ----------------------------- 設定はここまで set mode to "mode=control" --modeセット固定 set actionset to "&action=combine" --動作セット固定 --送信用データを生成。 set formData to mode & actionset & "&conf=" & conf if sendType = "0" then --ブラウザを使って送信 --getメソッドデータの生成。本当はURIエンコードしてから送信したいところ。 set sendCgi to indexSite & "?" & formData --使っているブラウザがIEなら「Internet Explorer」に、ねすけなら「Netscape Communicatorェ」にする tell application "Internet Explorer" Activate --起動して OpenURL sendCgi --cgiに送信 quit --終了する 。結果を見たいならこの行をコメントに変えるか削除する。 end tell else --ブラウザを使わずに送信 --URL Access Scripting(以下UAS)を使った方式。ブラウザを使うよりメモリ的に有利。 --UASではアップロードとダウンロードしかないため、生成した送信データを送りつけた後、必ずその結果画面を --ダウンロードすることになる。そこで、いったんデスクトップにダウンして、次にそのファイルを削除するようになっている。 try tell application "URL Access Scripting" activate --起動して set tmpFile to ((path to desktop) as text) & "temporary.html" --一時保存ファイル名 --download indexSite to file tmpFile replacing yes form data "?" & formData with progress --デスクトップにダウンロード download indexSite to file tmpFile replacing yes form data formData with progress --デスクトップにダウンロード quit --終了する 。 end tell --一時ファイルの削除 tell application "Finder" delete file tmpFile --一時ファイルをゴミ箱へ移動 --empty trash --ゴミ箱を空にするなら行頭の「--」を消す。 end tell on error errorNum display dialog errorNum end try end if