- Shopping Bag ( 0 items )
AppleScript is back in the limelight. As a core part of Apple Computer's strategy of moving forward, the once forgotten power of AppleScript was a big part of Steve Job's Seybold 1998 address. In addition, a new version of AppleScript is under development, and due to be released with Macintosh system 8.2 in June, 1998. This new version, and the subject of this book, shows a 10x speed improvement over the AppleScript of the last decade, and also incorporates a host of new features. In addition, AppleScript is to ...
Ships from: Chatham, NJ
Usually ships in 1-2 business days
AppleScript is back in the limelight. As a core part of Apple Computer's strategy of moving forward, the once forgotten power of AppleScript was a big part of Steve Job's Seybold 1998 address. In addition, a new version of AppleScript is under development, and due to be released with Macintosh system 8.2 in June, 1998. This new version, and the subject of this book, shows a 10x speed improvement over the AppleScript of the last decade, and also incorporates a host of new features. In addition, AppleScript is to be a part of Rhapsody, and a strong power-user and developers tool for many years to come.
Why all this attention? Well, much to Apple Computer's surprise as much as anyone else's, AppleScript has undergone something of a rebirth in the last two years. For instance, according to the Georgia Institute of Technology, Applescript is the second most popular language for CGI development after PERL.
This is pretty surprising. Why is it so? Previously a language for automating your Macintosh, AppleScript is now a language for automating the Internet. Using simple third party plug-ins, including Marionette from Allegiant technologies, you can now use AppleScript to reach out onto the Internet. For example, AppleScript is used by many graphics professionals to automate their repetitive tasks with PhotoShop and Quark Express. With Marionette you can now use AppleScript to automate those tasks on the graphics files on your web site. Or use AppleScript to search newsgroups for you, or even write your own simple custom web browser in AppleScript. In addition, with other easy add-ons you can use AppleScript to control servers and computers from other vendors, including Windows and Windows NT.This sleeper technology is covered in depth in AppleScript for the Internet:Visual QuickStart Guide, which begins with the basics, shows how to use AppleScript to control the most common programs used by creative professionals and webmasters, (Quark, Word, Illusrator, Photoshop) and then dives into scripting the Internet, (email, newsgroups, web searching and automation), creating CGI applications and talking to other computers.
CGI... ICG... GCI... GIC... do we care where this strange acronym came from? We do. The mysteries of its parent words hold the key to understanding how these Web-enabled scripts work. "Common gateway interface" is the phrase that was coined to describe the manner in which local scripts on a server receive data from an Internet client and return results at the end of their execution. A group of standards describes the way CGIs communicate on each platform. On UNIX, script and server sometimes share data via environment variables. On the Mac, the natural avenue for CGIs is Apple Events, which makes AppleScript a natural choice for handling the passing of data. CGIs on the Mac are often AppleScript script applications or FaceSpan applications. Most Mac Web servers, including WebSTAR and Apple's built-in Personal Web Sharing, are set up out of the box to support the .acgi and .cgi file suffixes to run AppleScript applications that support the standard CGI event handler we're about to meet. Mac OS 8.5 and CGIs A standard event to allow AppleScripts to communicate with Web servers has existed for some time. This event was previously known as on Çevent WWWsdocÈ. It lacked an English equivalent until OS 8.5 arrived. AppleScript 1.3.x gives us a simple and complete on handle CGI request handler. AppleScript automatically returns server variables to any on handle CGI request handler. With this new handler plus the improvements to speed and language you'll see how easy CGI scripting is in PPC-native AppleScript 1.3.x.4
FaceSpan is often used in creating AppleScript CGIs to take advantage of its built-in FIFO (first in first out) capabilities. When multiple CGI calls are sentto a normal script application, the last person to call the application gets their results first (this is called LIFO, or last in first out). This order of execution isn't desirable in a CGI environment, so it's often worthwhile to save yo ur CGI script applications as FaceSpan stand-alone applications to get FIFO performance.
Save your script as a stay-open application, never showing the startup dialog. When choosing between file suffixes, .acgi is most often is right choice over .cgi. Why? The a in .acgi stands for "asychronous," meaning that the web server will continue to work on other tasks while waiting for the CGI to return results. If you use the .cgi suffix for your CGI, the web server will wait for your CGI to get back to it before doing anything else! Not usually a good thing. Understanding GET data All data that goes to your AppleScript CGI application for processing comes from a Web client, and is submitted to the server using either the GET or POST methods. Forms submitted using the GET method will generate their name-value pairs and add them to the end of the submitted URL.
|Ch. 1||Getting to Know AppleScript||1|
|Ch. 2||Learning the Basics||7|
|Ch. 3||Let's Get Started||13|
|Ch. 4||AppleScript on the Desktop||43|
|Ch. 5||Open Transport and Networking||71|
|Ch. 6||Scripting Your Web Browser||87|
|Ch. 7||Scripting Emailer and Outlook Express||107|
|Ch. 8||Scripting Eudora Pro||137|
|Ch. 9||Fetch and Anarchie for FTP||151|
|Ch. 10||DataComet for telnet||165|
|Ch. 11||Building CGIs||179|
|Ch. 12||FileMaker Pro for HTML||199|
|Ch. 13||Microsoft Word for HTML||209|
|Ch. 14||CyberStudio for HTML||219|
|Ch. 15||QuarkXPress for HTML and Images||229|
|Ch. 16||Clip2gif and GifBuilder for Images||237|
|Ch. 17||Images with Photoshop and PhotoScripter||249|
|Ch. 18||Scripting with Apple Data Detectors||269|
|Ch. 19||Using Timbuktu Pro to Control Windows||275|
|Ch. 20||Scripting Mail and List Servers||281|
|Ch. 21||Marionet for Scripting the Internet||291|
|Ch. 22||The Big Project: A Web Server Monitor||301|
|Ch. 23||Giving Your Scripts a Face||305|
|Ch. 24||Debugging AppleScript||315|
|App. A||AppleScript Reference||323|
|App. B||To Learn More About AppleScript||331|
Posted September 24, 2002