V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
ddqp
V2EX  ›  Safari

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

  •  
  •   ddqp · Feb 22, 2017 · 2428 views
    This topic created in 3362 days ago, the information mentioned may be changed or developed.

    之前都还是好好的,升级到 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

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3383 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 12:13 · PVG 20:13 · LAX 05:13 · JFK 08:13
    ♥ Do have faith in what you're doing.