0
我想裝入音量,然後立即打開Finder窗口到特定路徑,但我無法從Apple腳本轉換爲JXA。如何安裝音量並使用Apple JXA打開文件夾
我想JXA相當於是這樣的:
tell application "Finder"
if not (disk "Airport Time Capsule" exists) then
mount volume "afp://AirPort%20Time%20Capsule._afpovertcp._tcp.local"
end if
open "/Volumes/Airport Time Capsule"
end tell
我已經嘗試了一些東西,但似乎沒有任何工作。 JXA的完整文檔不存在。
var finder = Application('Finder');
finder.mount('afp://.....'); // doesn't work
finder.mount.volume('afp://.....'); // doesn't work
finder.mountVolume('afp://.....'); // doesn't work
完美地工作,謝謝你,對於最後測試出來的延遲感到抱歉。我使用AirPort Time Capsule作爲例子,但實際上它不是我需要打開的文件夾。這是因爲隱私而無法發佈的工作。 – Francisc0