信不信由你,这个缺陷是我日常工作中浪费时间最多的#1。为了使默认导出文件夹与源文件位于同一文件夹,我最终制作了AppleScripts并将其嵌入到使用Automator的服务中。我是针对Pages中的pdf和Word导出,Numbers中的pdf和Excel以及Keynote中的pdf,PowerPoint和png这样做的。
附加以下代码-对于每种代码,您都需要在Automator中创建一个新的“快速操作”(服务),添加一个“运行AppleScript”步骤,将其设置为不接收任何输入,并将其设置为在特定应用程序中可用于剧本。您需要将每个服务保存为不同的名称(例如,“页面导出为pdf”,“主题导出为PowerPoint”等),因为即使特定于某个应用程序的服务都是全局的。作为可选的最后一步,我在每个应用程序中为它们分配了键盘快捷键(系统偏好设置→键盘→...)。请注意,如果这样做,您可能需要在应用程序级别而不是服务级别分配快捷方式,因为服务快捷方式显然无法复制。
免责声明我对Applescript并不完全满意,因此它们可能并不完美-但它们似乎对我来说足够好。
默认文件夹X看起来很不错,但是它不仅可以解决此缺陷,还有些过大。而且,如果您不想要其余的功能,则不能禁用它,但仍然可以解决此问题。
Apple应该正确解决此问题。
tell application "Pages"
set exportFile to file of front document as text
set exportFile to text 1 thru -6 of exportFile
set exportFile to exportFile & "pdf"
export front document to file exportFile as PDF with properties {image quality:Best}
end tell
tell application "Finder"
activate
reveal exportFile
end tell
tell application "Pages"
set exportFile to file of front document as text
set exportFile to text 1 thru -6 of exportFile
set exportFile to exportFile & "docx"
export front document to file exportFile as Microsoft Word
end tell
tell application "Finder"
activate
reveal exportFile
end tell
tell application "Numbers"
set exportFile to file of front document as text
set exportFile to text 1 thru -8 of exportFile
set exportFile to exportFile & "pdf"
export front document to file exportFile as PDF with properties {image quality:Best}
end tell
tell application "Finder"
activate
reveal exportFile
end tell
tell application "Numbers"
set exportFile to file of front document as text
set exportFile to text 1 thru -8 of exportFile
set exportFile to exportFile & "xlsx"
export front document to file exportFile as Microsoft Excel
end tell
tell application "Finder"
activate
reveal exportFile
end tell
tell application "Keynote"
set exportFile to file of front document as text
set exportFile to text 1 thru -4 of exportFile
set exportFile to exportFile & "pdf"
export front document to file exportFile as PDF with properties {PDF image quality:Best}
end tell
tell application "Finder"
activate
reveal exportFile
end tell
tell application "Keynote"
set exportFile to file of front document as text
set exportFile to text 1 thru -4 of exportFile
set exportFile to exportFile & "pptx"
export front document to file exportFile as Microsoft PowerPoint
end tell
tell application "Finder"
activate
reveal exportFile
end tell
tell application "Keynote"
set exportFile to file of front document as text
set exportFile to text 1 thru -5 of exportFile
export front document to file exportFile as slide images with properties {image format:PNG}
end tell
tell application "Finder"
activate
reveal exportFile
end tell