• 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: cgi
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Prev by Date: Re: Folder Action: Move and then open after download completes
  • Next by Date: RE: AppleScript In Web Publishing...
  • Previous by thread: RE:InDesign 'crop images to frames'
  • Next by thread: Second Question about Links in active InDesign Spread
  • Index(es):
    • Date
    • Thread