V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
ddqp
V2EX  ›  Safari

请问为什么这个语句会出错 safari applescript

  •  
  •   ddqp · 2017-02-22 17:45:54 +08:00 · 1945 次点击
    这是一个创建于 2612 天前的主题,其中的信息可能已经有所发展或是发生改变。

    之前都还是好好的,升级到 10.12.4 Beta 就出错了,错在 "URL of front document" 中的 URL 这个变量. 本人小白, 大神请轻喷.

    on run {theURL, parameters}

    -- Copies URL of the current tab to the clipboard
    -- Requires Alfred PowerPack
    tell application "Safari"
    	set theURL to URL of front document
    	set the clipboard to theURL as string
    end tell
    
    set input02 to (theURL as text)
    #do shell script "/usr/local/bin/you-get -p /usr/local/bin/mpv ' input02' &"
    do shell script ("/usr/local/bin/you-get -p /usr/local/bin/mpv '" & input02 & "'")
    
    return theURL
    

    end run

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3520 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 04:55 · PVG 12:55 · LAX 21:55 · JFK 00:55
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.