Re: AppleScript CGI Limitations
Re: AppleScript CGI Limitations
- Subject: Re: AppleScript CGI Limitations
- From: Lars DeRuntz <email@hidden>
- Date: Tue, 19 Mar 2002 18:52:35 -0800
The previous guy wrote:
>
>I want to create an AS CGI script that will display a dialog each time the
>
>CGI script is accessed, containing some data that the client sent. This is
>
>for clients to post a quick request to the admin at my site. I am not
>
>worried about security issues as this is internal. I would also like to log
>
>this information to a file/files.
If you have a Mac OS 9 web server go here:
http://www.apple.com/applescript/AScript_CGI/
This is what you want to start with. You can then adapt this to your needs.
you could "display dialog" with " giving up after 20 seconds"...and see how that works for
you.
Then, use AppleScript to create/append a log file.
set theDataInFile to post_arguments as text
--Try to save the sample data for examination
tell application "Finder"
set thePathAndFile to "Macintosh HD:Web Pages:Dump.txt"
if file thePathAndFile exists then
try
close access file thePathAndFile
on error
end try
delete file thePathAndFile
end if
open for access file thePathAndFile with write permission
write (theDataInFile & crlf) to file thePathAndFile starting at 1
close access file thePathAndFile
end tell
BUT, THIS example just dumps the POST ARGUMENTS deleting the previous file. You could
modify this to append, by "write" ... " starting at eof thePathAndFile" or something like
that.
-Lars DeRuntz
iLogistix
Fremont, CA
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.