1

具有自定义文件类型扩展名的“另存为”对话框的 AppleScript 代码是什么?

我知道打开对话框的代码:

set theFiles to (choose file of type {"set"} with prompt "Save As File" without multiple selections allowed) as string
4

1 回答 1

4

保存命令可以在应用程序本身中找到,而不是在标准添加中。如果您尝试建立传递给保存命令的路径,则可以使用以下内容:

set resultFile to (choose file name with prompt "Save As File" default name "My File" default location path to desktop) as text
if resultFile does not end with ".txt" then set resultFile to resultFile & ".txt"
于 2013-07-08T17:30:54.893 回答