|
||||||||||||||||||||||||
JavaScript OSA QuickStartOnce you have installed the JavaScript OSA extension in your extensions folder, and rebooted your Macintosh, you are ready to start scripting with JavaScript. Step 1 - Choose the JavaScript language In the Script Editor, there is a popup menu in the lower left corner of the script window that lets you select a scripting language. Use this menu to choose JavaScript.
Step 2 - Enter a simple script At this point, you can enter any valid JavaScript statements. Here is a script that returns the text "Hello World".
And that's it. You've written your first JavaScript script on the Mac. You can explore the JavaScript OSA documentation to learn about the MacOS-specific features of the JavaScript OSA implementation. These facilities allow you to control any scriptable Macintosh application directly from JavaScript. To get you started, here's a script which uses the Finder to gather the names of all the files on your desktop. You can also look at the scripts in the Samples folder included in the JavaScript OSA distribution.
|
||||||||||||||||||||||||