Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/macos/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Macos 有没有办法用AppleScript在VLC中打开文件?_Macos_Applescript_Vlc - Fatal编程技术网

Macos 有没有办法用AppleScript在VLC中打开文件?

Macos 有没有办法用AppleScript在VLC中打开文件?,macos,applescript,vlc,Macos,Applescript,Vlc,我想现在获取在VLC中打开的文件的全名 我只是发现: tell application "VLC" set current_file to name of first window end tell 但它返回的是current_filecurrent窗口的标题,该标题是唯一没有扩展名的文件名。 而我需要一条完整的路径 我能把这件事做完吗 谢谢。您在Skcript Editor中查看过VLC字典吗?你会发现 tell application "VLC" log (get name

我想现在获取在VLC中打开的文件的全名

我只是发现:

tell application "VLC"
    set current_file to name of first window
end tell
但它返回的是
current_file
current窗口的标题,该标题是唯一没有扩展名的文件名。 而我需要一条完整的路径

我能把这件事做完吗


谢谢。

您在Skcript Editor中查看过VLC字典吗?你会发现

tell application "VLC"
    log (get name of current item)
    log (get path of current item)
end tell
在VLC套件内

享受,
Michael/Hamburg

Alack,它也返回“仅文件名,不带扩展名”,而不是完整路径:(哦,对不起,是我没注意到。
tell
中的第二行非常好用。非常感谢。