2016-03-07 63 views
2

我想獲得現在在VLC中打開的文件的全名。有沒有辦法使用AppleScript在VLC中打開文件?

我只發現了這一點:

tell application "VLC" 
    set current_file to name of first window 
end tell 

但在current_file當前窗口的標題這是隻有不帶擴展文件名返回。 而我需要一個完整的路徑。

我能完成這件事嗎?

謝謝。

回答

4

你看過VLC的Skript-Editor中的字典嗎?你會發現像

tell application "VLC" 
    log (get name of current item) 
    log (get path of current item) 
end tell 

的VLC套房內。

享受, 邁克爾/漢堡

+0

嗚呼,則返回「僅文件名沒有擴展名」也一樣,不是一個完整路徑。 :( –

+0

我在這兩個版本中都得到了擴展名。嗯... – ShooTerKo

+0

哦,對不起,這是我的注意力不集中,'tell'中的第二行非常完美,非常感謝。 –

相關問題