2013-07-08 67 views
1

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

我知道打开对话框代码:

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

回答

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" 
+0

感谢。很棒。 –