Anyway to run AppleScript CGI's in Mac OSX Server (10.4)

I am running an Xserve on OS X Server 10.4.10

I am having the same issue. It seems that Apple claims that OS X Server has native support for AppleScript CGI’s but everything they claim is a phantom. They claim you NEED OS X server, that all you need to do is run the ACGI Enabler in the utilities folder. Which does not exist.

The optional program"acgi dispatcher" has no online support and has not been updated since 2005 so I can not speak to it’s effective use. But i can only get it to work in OS 10.4 (Client) not OS X Server.

So can ANYBODY please help. This was a simple service 7 years ago, but now seems to be impossible even with the BEST technology.

So i implore the Mac Hints Community, can anybody explain how i can get AppleScript CGI’s (acgi’s) working in Mac OS 10.4 Server?

Any help is appreciated,
Cheers,
TalonGold

PS> Here are your references.

http://www.apple.com/applescript/guidebook/sbrt/pgs/sbrt.12.htm

Quote; “AppleScript CGIs are fully supported with Apache running on Mac OS X Server. See the Mac OS X Server release notes for more information.”

-Looking in that Server notes

http://manuals.info.apple.com/en/Migration_v10.4_2nd_Ed.pdf

Quote: For dynamic content, consider recoding your existing CGIs using the native Mac OS X Server web server capabilities. You can also run AFIP CGIs based on AppleScript, and it’s no longer necessary to have the Classic environment available to run them; run the ACGI Enabler (in /Applications/Utilities/) to set up Apache support for these legacy CGIs.

That magical “ACGI Enabler” does not exist ANYWHERE, that exact reference is in the 10.3 Server Notes as well

-So I went looking in apple support

http://docs.info.apple.com/article.html?artnum=107925

Quote: “Mac OS X Server 10.3 does not include the AppleScript CGI enabler, and it does not support running AppleScript CGIs”

-So I dug some more

http://docs.info.apple.com/article.html?artnum=106519

There is agrees. PLEASE HELP

Does it have to be AppleScript? Python and Ruby have equal support for application scripting (see my sig) and are far more CGI-friendly.

Only reason I like applescript is because many of the current apps we use are very simply apple scriptable. No new code, no new scripts, just returning the CGI’s from simple applescripts. I know the HTML parsing is a bit of a pain, but I already have all those scripts laid out. I’m just looking for a way to do this on OS X Server. I got it working fine in OS X client, but don’t want to have a slave machine to the server just to run a few applescripts CGI’s.

Cheers,
Talon

A while ago I noticed acgi dispatcher while browsing around some of the author’s other stuff. It has not been updated in a while, but its last release date was a few months after 10.3 came out. It is not Universal, does Mac OS X Server 10.4 support Rosetta?

I have not used this, nor do I run any AppleScript CGI handlers. This is just something I came across while browsing.

Good luck!

Edit: acgi dispatcher was actually last updated several years after 10.3 came out. It was last updated several months after 10.3.9 was released.

acgi dispatchers runs GREAT in OS X 10.3 and 10.4 CLIENT, but i can’t get it to run in OS X 10.4 Server, and our Xserver is still G5 so it’s not a worry to use rosetta etc.

Anybody else, on the right track.

Cheers,
Talon

Porting existing AppleScript code over to Python or Ruby is pretty trivial if you already know one or other of those languages. e.g.:

tell application "TextEdit"
    set myText to (get paragraph 1 of document "Read Me")
end tell

becomes:

TE = app("TextEdit")
myText = TE.documents["Read Me"].paragraphs[1].get()

There’s even a GUI-based tool, ASTranslate, on the appscript website that lets you type in and run an AppleScript command to see its Python/Ruby equivalent.

In addition, if you’ve got a lot of existing AppleScripts that you really don’t want to port, Python appscript includes a module, ‘osascript’, that allows you to load AppleScripts and call their handlers directly from Python - it currently lacks documentation but usage is quite straightforward; just ask.

Alternatively, if you really want to stick with pure AppleScript and ACGI Dispatcher isn’t an option, Satimage do a commercial version of Smile called Smile Server which might work on OS X Server, although you’ll need to ask them as their website doesn’t say.

HTH

p.s. Oh, and you can also use appscript to call handlers in AppleScript applets, of course. I think I’ve got some sample code somewhere that shows how to do this.