[Google Chrome]Twitterへ投稿する
1:URLを取得する
2:タイトルを取得する
3:%エンコードする
4:URLを整形して
5:URLを開く を処理します
ダウンロード - twittere381b8e68a95e7a8bf.zip
#!/usr/bin/env osascript
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
#
# スクリプトをユーザーのスクリプトメニューフォルダにコピーします
#
#
# com.cocolog-nifty.quicktimer.icefloe
----+----1----+----2----+-----3----+----4----+----5----+----6----+----7
use AppleScript version "2.4"
use framework "Foundation"
use scripting additions
tell application "AppleScript Utility"
set application scripts position to top
set Script menu enabled to true
set show Computer scripts to true
set boolGuiScript to GUI Scripting enabled
if boolGuiScript is false then
GUI Scripting enabled
end if
set theAppPath to default script editor
log theAppPath
end tell
tell application "Finder"
set aliasScriptPath to path to scripts folder from user domain
set boolFolderChk to exists of (folder "Applications" of folder aliasScriptPath)
if boolFolderChk is false then
make new folder at aliasScriptPath with properties {name:"Applications", displayed name:"Applications", comment:"Applications"}
end if
set aliaseScriptAppPath to (folder "Applications" of folder aliasScriptPath) as alias
set boolFolderChk to exists of (folder "Google Chrome" of folder aliaseScriptAppPath)
if boolFolderChk is false then
make new folder at aliaseScriptAppPath with properties {name:"Google Chrome", displayed name:"Google Chrome", comment:"Google Chrome"}
end if
set aliasDistDir to (folder "Google Chrome" of folder aliaseScriptAppPath) as alias
set theDistDir to POSIX path of aliasDistDir as text
end tell
tell application "Finder"
set aliasContainerDir to container of (path to me) as alias
set theContainerDir to POSIX path of aliasContainerDir as text
end tell
set theCommandText to ("ditto \"" & theContainerDir & "Google Chrome\" \"" & theDistDir & "\"")
do shell script theCommandText
tell application "Finder"
open (folder "Twitterへ投稿" of folder "Google Chrome" of folder aliaseScriptAppPath)
select (folder "Twitterへ投稿" of folder "Google Chrome" of folder aliaseScriptAppPath)
end tell