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