applescript choose file title

谁都会走 提交于 2020-03-06 02:17:14

问题


I have got a choose file in my applescript. How do I change the title of the Choose a File window that comes up. I am aware of with prompt, but it doesn't change the title.

Edit: ulvund answered I'm afraid with prompt is the best you can do, but are there any other ways to get a choose file without applescript? Also, are there any hacks?

Edit 2: Red_Menace answered (look below) but are there any good tutorials on how to do this in Cocoa-Applescript?

P.S. Look at my comments.

Edit 3: I have put this into another question.


回答1:


The dialog in plain AppleScript doesn't have that option, but you can access various Cocoa methods in Snow Leopard and Lion using AppleScriptObjC. In Lion, you can create a Cocoa-AppleScript Applet from the template in the AppleScript Editor, then create your own dialog, for example using NSOpenPanel.




回答2:


I'm afraid with prompt is the best you can do:

http://docs.info.apple.com/article.html?path=AppleScript/2.1/en/as309.html




回答3:


An answer to the edited question: You can use Automator.

Ask for Finder Items action in Files & Folders library will show the choose file dialog. You can change the title of the dialog of this action.



来源:https://stackoverflow.com/questions/8112824/applescript-choose-file-title

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!