Borrowing Scripts


An easy way to make a script is to modify an existing script that does something close to what you want. You simply duplicate the script file in the Finder, open the duplicate copy, and make changes. You can do this with scripts that have been saved as applications, compiled scripts, or text files. (You can’t open a script that has been saved as a run-only script.)

Apple has developed a number of scripts that you can use as starting points or models for your own scripts. You can find some scripts in the Example Scripts folder, which is in the AppleScript folder in the Applications folder. Another place to look is the Scripts folder, which is in the /Library folder. The official AppleScript site has some (www.apple.com/applescript/). Check out the Learn AppleScript, Help & Examples, and Download Scripts areas of this site. Part of the AppleScript site has scripting examples specifically for Mac OS X (www.apple.com/applescript/macosx/).

If you have upgraded to Mac OS X from a previous version of the Mac OS, look for Mac OS 9 scripts in the Automated Tasks folder of the Apple Menu Items folder, which is located in the System Folder. You may find more Mac OS 9 scripts in the AppleScript folder of the Apple Extras folder, which is normally in the folder named Applications (Mac OS 9). Additional Mac OS 9 scripts are located in the AppleScript Extras folder of the CD Extras folder on the Mac OS 9 CD-ROM.

Note

Some Mac OS 9 scripts work as-is with Mac OS X, but many require some tweaking. In particular, scripts made to control the Mac OS 9 Finder are likely to require modification, and some parts may not work at all.




Mac OS X Bible, Panther Edition
Mac OS X Bible, Panther Edition
ISBN: 0764543997
EAN: 2147483647
Year: 2003
Pages: 290

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net