編輯器:AppleScript Editor
這位仁兄寫的入門文章還不錯:http://bukkake.iteye.com/blog/828322,就不重復了。
下面補充一點別的
AppleScript的后綴名為.scpt,可以將編寫好的.scpt導出為幾種格式:.applescript(Text), .app(Application), .scptd(script bundle),都有什么用呢?
.scptd(script bundle):像Mac上其他的bundle一樣,是一個壓縮包,包含scpt文件和其他的聲音、圖片等資源。雙擊后打開AppleScript Editor
.app(Application):也是一個bundle,區別就是它已經是一個app了,雙擊就運行。
.applescript(Text):就是文本文件了,沒啥好說的。雙擊后打開AppleScript Editor
.scpt:不要以為用Editor編寫完直接保存的.scpt文件一定是文本文件,.scpt不是文本文件,而是被編譯后的文件。雙擊后打開AppleScript Editor
下面是官方對此的描述:
AppleScript 1.9.2 supports a new bundled format for compiled scripts and script applications (applets) that uses standard Mac OS X bundles. Compiled script bundles have the filename extension ".scptd", while applet bundles have the filename extension ".app".
Scripting additions can be embedded within bundled applets by placing them in a folder named Scripting Additions inside the bundle's Contents/Resources/ folder. Note that Script Editor does not look for embedded scripting additions when editing bundled applets. Any required scripting additions must be properly installed in the normal locations during script development so that Script Editor can find them.
還有啥是bundle,給我等小白看的:
A bundle is a bundle. A "folder" where you can find the usual stuff: a "Info.plist" file containing info about the bundle (the app), a "PkgInfo" file containing the file and creator type of the bundle, a "MacOS" folder containing an executable archive and a "Resources" folder, where you keep all other stuff: icons, scripts, scripting additions, localizable files, etc.