Clip2gif to convert any PICT files into GIF images. • HTML Grinder to sequentially link each of the HTML files together as well as create ...
Document source : haddockdot.no-ip.biz
variables, and most importantly, wait until the script is finished executing. Through the use
of AppleEvents, much of this can be eliminated, a wider variety of scripting (programming)
languages are available to you, and your scripts can run concurrently with the server
application.
To make this happen using AppleScript as your scripting language you must:
1. Include a handler in your script that waits for and processes AppleEvents
2. Save your script as an application (not a text file) making sure the "Stay Open" and
"Never Show Startup Screen" options are checked
3. Give your script a .cgi extension rather than a .script extension
The "Hello, World" script (hello-world-05.cgi) is revisited here to illustrate this concept:
-- process the AppleEvent sent to this script by the server
on «event WWW
sdoc»
-- define the standard HTTP header
set LF to ASCII character (10)
set CR to return
set CRLF to CR & LF
set http_10_header to "HTTP/1.0 200 OK" & CRLF & ¬
"Server: MacHTTP" & CRLF & ¬
"MIME-Version: 1.0" & CRLF & ¬
"Content-type: text/html" & CRLF & CRLF
-- return the results as an HTML file
return http_10_header & ¬
Summary :
script (hello-world-05.cgi) is revisited here to illustrate this concept: -- process the AppleEvent sent to this script by the server on «event WWW sdoc» -- define the standard HTTP header set LF to ASCII character (10) set CR to return set CRLF to CR &
Tags :
script,crlf,set,return,scripting,file,http10header,extension,application,appleeents,serer,amp,run