【问题标题】:Path with blank spaces and hyphen "-" using AppleScript使用 AppleScript 的带有空格和连字符“-”的路径
【发布时间】:2020-05-24 04:14:17
【问题描述】:

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

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

【问题讨论】:

  • 你还有一些空间可以逃脱。您也可以使用quoted form 属性。
  • 引用的形式是什么?

标签: path applescript spaces save-as


【解决方案1】:

我最后只是添加了更多的 & 符号:

PHY101" & " - " & "Current

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

【讨论】:

    猜你喜欢
    • 2014-09-11
    • 1970-01-01
    • 1970-01-01
    • 2021-10-09
    • 1970-01-01
    • 2012-08-30
    • 1970-01-01
    • 2013-01-23
    • 1970-01-01
    相关资源
    最近更新 更多