re: cgi
re: cgi
- Subject: re: cgi
- From: tom wible <email@hidden>
- Date: Mon, 05 Mar 2007 16:13:19 -0500
i kludged up an html interface to some applescript i wrote (so i can read it
from the couch;-) i have my applescript running as an FBA, and i have a utility
a/s that dispatches args to it:
on run argv -- osascript/cli only
try
set i to (count (argv)) -- throws error if not cli
set cmd to contents of (item 1 of argv)
if cmd = "status" then
tell application "playRec"
activate
return getStatus()
end tell
...
i then have a shell script that calls the applescript:
/usr/bin/osascript /DVR/scripts/DVRcntrl.scpt $QUERY_STRING
of course the apache user can't talk to the applescript running under the
logged-in user, so the trick is the setup sudoers to allow www to
sudo -u applescript-runner /usr/bin/osascript...
like i said, a kludge, but it gets the job done;-) check it out:
toms.homeunix.net:8277 (7am-2pm)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden