• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: AppleScript CGI Limitations
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >AppleScript CGI Limitations (From: Cortland Haws <email@hidden>)
 >Re: AppleScript CGI Limitations (From: James Sentman <email@hidden>)

  • Prev by Date: Re: Rounding
  • Next by Date: Re: Rounding
  • Previous by thread: Re: AppleScript CGI Limitations
  • Next by thread: Re: AppleScript CGI Limitations
  • Index(es):
    • Date
    • Thread