右鍵縮址 - MAC

By Victoria
at 2011-04-18T23:45
at 2011-04-18T23:45
Table of Contents
今天研究了一個晚上XD
因為我一直不想讀automator跟applescript的文件Orz
所以最後沒有達到我想要的功能
但也不差了
我本來預想的功能:
複製網址後,再想貼上短網址的地方右鍵"貼上短網址"
目前的功能:
選取網址後,右鍵選擇"縮址",到想貼上短網址的地方貼上
下面是教學,不用裝甚麼其他的軟體
另外因為我是使用英文的作業系統,所以下面的一些名稱都會用英文的
非常抱歉
1.到你的applications 裡面打開 automator
2.選擇 service
3.Service receives selected "URLs" in "any application"
(URLs 跟 any application於下拉式選單中選取)
4.左上方搜尋框搜尋 applescript
5.將Run Applescript 拖至右方區塊
6.將Run Applescript 中文字方塊內容全部刪除 並貼上以下程式碼
(此段程式碼修改自http://tinyurl.com/5c43v9)
on run {input, parameters}
set the ClipURL to (input as string)
ignoring case
if ((characters 1 through 4 of ClipURL as string) is not "http") then
set ClipURL to ("http://" & ClipURL)
end if
set curlCMD to
"curl --stderr /dev/null \"http://tinyurl.com/api-create.php?url="
& ClipURL & "\""
-- Run the script and get the result:
set tinyURL to (do shell script curlCMD)
set the clipboard to tinyURL
return tinyURL
end ignoring
end run
其中
set curlCMD to
"curl --stderr /dev/null \"http://tinyurl.com/api-create.php?url="
& ClipURL & "\""
為同一行
7.存檔,並取一個你喜歡的名字(這個名字將出現再右鍵選單中)
8.完成
謝謝指教
--
因為我一直不想讀automator跟applescript的文件Orz
所以最後沒有達到我想要的功能
但也不差了
我本來預想的功能:
複製網址後,再想貼上短網址的地方右鍵"貼上短網址"
目前的功能:
選取網址後,右鍵選擇"縮址",到想貼上短網址的地方貼上
下面是教學,不用裝甚麼其他的軟體
另外因為我是使用英文的作業系統,所以下面的一些名稱都會用英文的
非常抱歉
1.到你的applications 裡面打開 automator
2.選擇 service
3.Service receives selected "URLs" in "any application"
(URLs 跟 any application於下拉式選單中選取)
4.左上方搜尋框搜尋 applescript
5.將Run Applescript 拖至右方區塊
6.將Run Applescript 中文字方塊內容全部刪除 並貼上以下程式碼
(此段程式碼修改自http://tinyurl.com/5c43v9)
on run {input, parameters}
set the ClipURL to (input as string)
ignoring case
if ((characters 1 through 4 of ClipURL as string) is not "http") then
set ClipURL to ("http://" & ClipURL)
end if
set curlCMD to
"curl --stderr /dev/null \"http://tinyurl.com/api-create.php?url="
& ClipURL & "\""
-- Run the script and get the result:
set tinyURL to (do shell script curlCMD)
set the clipboard to tinyURL
return tinyURL
end ignoring
end run
其中
set curlCMD to
"curl --stderr /dev/null \"http://tinyurl.com/api-create.php?url="
& ClipURL & "\""
為同一行
7.存檔,並取一個你喜歡的名字(這個名字將出現再右鍵選單中)
8.完成
謝謝指教
--
Tags:
MAC
All Comments

By Bethany
at 2011-04-21T23:50
at 2011-04-21T23:50

By Tom
at 2011-04-24T17:14
at 2011-04-24T17:14

By Erin
at 2011-04-25T15:09
at 2011-04-25T15:09

By Kama
at 2011-04-25T17:17
at 2011-04-25T17:17

By Lucy
at 2011-04-29T11:16
at 2011-04-29T11:16

By Todd Johnson
at 2011-04-30T05:33
at 2011-04-30T05:33

By Michael
at 2011-05-04T22:21
at 2011-05-04T22:21

By Cara
at 2011-05-05T04:06
at 2011-05-05T04:06
Related Posts
Incase Hardshell Case MB Pro13保護殼

By Dorothy
at 2011-04-18T23:30
at 2011-04-18T23:30
登入無名網誌自動跳出???

By Edwina
at 2011-04-18T22:22
at 2011-04-18T22:22
AIR'11的64GB與128GB的抉擇

By Leila
at 2011-04-18T22:09
at 2011-04-18T22:09
mbp2011 13吋 新硬碟灌OS

By Daph Bay
at 2011-04-18T21:40
at 2011-04-18T21:40
MBP 玩遊戲減壽說

By Ursula
at 2011-04-18T19:12
at 2011-04-18T19:12