おもろい、めずらしいアップルスクリプト発表会

このエントリーをはてなブックマークに追加
215名無しさん@お腹いっぱい。
--レスxx-yyを通常形式で表示
tell application "iCab"
try
set currenturl to URL of window 1
if currenturl contains "&ls=" then
set AppleScript's text item delimiters to (text -1 thru -6 of currenturl)
set urllist to every text item of currenturl
set currenturl to (item 1 of urllist & item 2 of urllist) as text
end if
if currenturl contains "imode=true&" then
set AppleScript's text item delimiters to "imode=true&"
set urllist to every text item of currenturl
set currenturl to (item 1 of urllist & item 2 of urllist) as text
end if
try
set xxyy to text returned of (display dialog "レス範囲を指定(xx-yy)" default answer "" default button "OK")
set AppleScript's text item delimiters to "-"
set xxyylist to every text item of xxyy
set xx to (item 1 of xxyylist) as text
set yy to (item 2 of xxyylist) as text
set currenturl to (currenturl & "&st=" & xx & "&to=" & yy) as text
OpenURL currenturl
end try
end try
end tell


いずれもエラー処理が適当なので、うまく動かなかったら御容赦を。。
i-mode版じゃなくても一応動きます。
「レスxx-yyを通常形式で表示」は我ながら便利かと。
216腐れ : 2001/03/10(土) 01:45 ID:vSPh3Vjc
>213-215 さん
素晴らしいですね。
「レスxx-yyを通常形式で表示」を、IE用に移植してみました。
これ、むちゃくちゃ便利ですね。
---
tell application "Internet Explorer"
set currenturl to item 1 of (GetWindowInfo (item 1 of (ListWindows)))
if currenturl contains "&ls=" then
set AppleScript's text item delimiters to (text -1 thru -6 of currenturl)
set urllist to every text item of currenturl
set currenturl to (item 1 of urllist & item 2 of urllist) as text
end if
try
set xxyy to text returned of (display dialog "レス範囲を指定(xx-yy)" default answer "" default button "OK")
set AppleScript's text item delimiters to "-"
set xxyylist to every text item of xxyy
set xx to (item 1 of xxyylist) as text
set yy to (item 2 of xxyylist) as text
set currenturl to (currenturl & "&st=" & xx & "&to=" & yy) as text
OpenURL currenturl toWindow 0
end try
end tell