Created
August 25, 2016 10:41
-
-
Save yxjxx/7cca8559bfb08d805e60a7d1d02f8183 to your computer and use it in GitHub Desktop.
打开 iTerm 使用 you-get 下载 Chrome 当前 tab 页的视频
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on alfred_script(q) | |
-- your script here | |
tell application "Google Chrome" | |
-- 获取当前标签页的标题 | |
set tabname to get title of active tab of window 1 | |
-- 获取当前标签页的超链接地址 | |
set taburl to get URL of active tab of window 1 | |
tell application "iTerm" | |
activate | |
set the clipboard to "cd /Users/yxj/env3;source bin/activate;you-get " & taburl & "" | |
delay 0.5 | |
tell application "System Events" | |
keystroke "v" using command down | |
keystroke return | |
end tell | |
end tell | |
tell application "Google Chrome" to close active tab of window 1 | |
do shell script "echo " & tabname & " " | |
end tell | |
end alfred_script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment