2013-07-08 69 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

感謝。很棒。 –