property theCurrentURL : ""
tell application "Google Chrome"
set theCurrentURL to URL of active tab of window 1
close active tab of window 1
end tell
tell application "Terminal"
do script "/usr/local/Cellar/mpv/0.17.0/bin/mpv " & theCurrentURL
end tell
1
crayygy Jun 16, 2016
echo exit?
|
2
zander Jun 17, 2016
直接 osascript 不要 tell terminal 。
|
3
allan1st Jun 17, 2016
试试不要 tell application 直接 `do shell script ("/usr/local/bin/mpv " & theCurrentURL & "&")`
|
4
exxfzc Jun 14, 2017
我用 alfred 快捷打开 mpv,观看视频关闭 mpv 后,终端还是依然在,要手动关闭,很麻烦
|