on open drp --串リストのファイルをドロップして登録に変更 set proxylist to drp display dialog "登録しました..." buttons {"確認"} default button 1 giving up after 1 end open
open for access proxylist set plist to read proxylist using delimiter return set plist to reverse of plist --後から追加したモノが上に来るように変更 close access proxylist set newproxy to (choose from list (plist) with empty selection allowed) if newproxy is {} then --未選択でOKにするとプロキシーを解除できるに変更 tell application "ICScriptor" SetICPreference use HTTP proxy without to quit end tell else tell application "ICScriptor" SetICPreference HTTP proxy host to newproxy SetICPreference use HTTP proxy with to quit end tell end if
try tell application "Finder" open cmi end tell on error set cmi to choose file with prompt "\"Copy My IP\"はどこですか?" tell application "Finder" open cmi end tell end try
set crip to the clipboard as "TEXT" if tmpip is "" then set tmpip to crip set tmpdt to current date display dialog "- 初期登録 -" & return & "IP: " & tmpip & return ツ & " (" & tmpdt & ")" as string buttons {"OK"} default button 1 with icon 1 else if crip is tmpip then display dialog "- 変化ありません -" & return & "現在: " & crip & return ツ & " (" & (current date) & ")" & return & "登録: " & tmpip & return & " (" & tmpdt & ")" ツ as string buttons {"OK"} default button 1 with icon 1 giving up after 3 else display dialog "= 変わってます =" & return & "現在: " & crip & return ツ & " (" & (current date) & ")" & return & "登録: " & tmpip & return & " (" & tmpdt & ")" ツ as string buttons {"OK"} default button 1 with icon 2 set tmpip to crip set tmpdt to current date end if
Help Viewerの表示ファイルを、IEに渡して表示するためのスクリプト。 -- tell application "Help Viewer" to set theFile to current file tell application "Internet Explorer" to open theFile -- ドリの体験版落としたら、ヘルプがHelp Viewer表示になってて萎えたので…。
on idle set Aptext to "" tell application "Finder" set Aplist to every process that file type is "APPL" and frontmost is true if Aplist /= {} then set Aptext to (name of file of item 1 of Aplist) as string end if end tell
if Aptext = "Mozilla" then ---使っているブラウザ名 tell application "作業環境マネージャ" if current location /= location "web" then ---ブラウジングの環境名 activate set current location to location "web" ---ブラウジングの環境名 end if end tell tell application "Mozilla" activate end tell
else if Aptext = "Eudora" then ---使っているMailer名 tell application "作業環境マネージャ" if current location /= location "mail" then ---メールの環境名 activate set current location to location "mail" ---メールの環境名 end if end tell tell application "Eudora" activate end tell
else ---その他の場合 tell application "作業環境マネージャ" if current location /= location "normal" then ---そのたの環境名 activate set current location to location "normal" ---そのたの環境名 end if end tell end if
return 1
end idle --アプリケーション化する時に「実行後、自動的に終了しない」のチェックボックスにチェックをしておく必要がある。 --保存:classicアプリケーション【実行後、自動的に終了しない】
tell application "Finder" set file_list to selection as list repeat with the_file in file_list set name of the_file to "test" move the_file to trash end repeat end tell
--応用 repeat set Vol_Level to text returned of (display dialog ツ "0〜7までの数字を入力して音量調節します" default answer "" with icon 1) try set Vol_Number to Vol_Level as number if Vol_Number ウ 0 and Vol_Number イ 7 then if Vol_Level does not contain "." then exit repeat end if end try end repeat set volume Vol_Number
set file_index to 0 tell application "Finder" set file_list to selection as list repeat with the_file in file_list set file_index to file_index + 1 set name of the_file to "test" & file_index move the_file to trash end repeat end tell
tell application "Finder" set file_list to selection set iend to count of file_list repeat with i from 1 to iend set the_file to item i of file_list as alias set name of the_file to "test_" & i move the_file to trash end repeat end tell
repeat with 〜 in 〜の使い方を理解したので別バージョンにしてみました。 何故エイリアス値にすれば上手くいくのかは理解できませんでしたw
tell application "Finder" set file_list to selection repeat with the_file in file_list set the_file to the_file as alias set name of the_file to "~" & name of the_file move the_file to trash end repeat end tell