Applescript:如何获取当前查找器窗口的完整路径?

Kam*_*iad 0 applescript

我有此脚本它工作正常,但它不给我,当我在网络上打开Finder窗口中的完整链接,至极应该以"卷",如何让它检测到它开始?

谢谢

    tell application "Finder"
            if exists window 1 then
                set currentDir to POSIX path of ((target of front Finder window) as text)
            else
                set currentDir to POSIX path of (path to desktop folder)
            end if
    end tell
        log currentDir
Run Code Online (Sandbox Code Playgroud)

foo*_*foo 5

tell application "Finder"
    if exists Finder window 1 then
        set currentDir to target of Finder window 1 as alias
    else
        set currentDir to desktop as alias
    end if
end tell
log POSIX path of currentDir
Run Code Online (Sandbox Code Playgroud)