使用AppleScript的空格和连字符“-”的路径

问题描述 投票:0回答:1

我正在尝试使用以下路径和名称保存文档:

set outpath to "Dropbox/PHY101 - Current/" & "E1S1.pdf"

但是,由于空格,这是行不通的。我尝试使用:

PHY101\\ -\\ Current and PHY101\ -\ Current

他们都没有工作。

这是其余代码:

tell application "Microsoft Word"
    set activeDoc to active document
    save as activeDoc file name outpath file format format PDF
end tell
path applescript spaces save-as
1个回答
0
投票

我最终只是增加了更多的&符:

PHY101" & " - " & "Current

但是我仍然不明白为什么其他方法不起作用。

© www.soinside.com 2019 - 2024. All rights reserved.