Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: cgi



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:
http://lists.apple.com/mailman/options/applescript-users/email@hidden
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.