Re: PHP and Applescript
Re: PHP and Applescript
- Subject: Re: PHP and Applescript
- From: has <email@hidden>
- Date: Sun, 10 Feb 2008 17:15:26 +0000
On 10 Feb 2008, at 16:32, Grace Finn wrote:
I don't understand either. Why should Windows users be looking for
the acgi file, which sits behind the scenes on your web server?
Sorry, two different approaches. The first approach I tried used
the ACGI dispatcher. I had added a web page refresh to the
applescript so it would not continue to try to "open" the acgi as if
it were a web page.
tell application "Safari"
do JavaScript "window.location.reload()" in front document
delay 0
end tell
tell application "Robot Controller"
tell the first robot
delay 3
tell outputs "AC"
set direction to Forwards
set activity to SwitchOn
delay 1
set activity to SwitchOff
end tell
end tell
end tell
The link on the web page was a link to the acgi file.
I get the impression that you're a bit confused as to how CGI in
general, and ACGI in particular, actually works. Your webpage
shouldn't link directly to the ACGI script; it should submit a POST
request from a web form to the web server (in this case, Apache + ACGI
Dispatcher) which then calls the ACGI script's 'handle CGI request'
handler, passing it the form data to process and returning its result
as a new web page when done.
As a rough guide, think of the web form as being equivalent to an
AppleScript, and the web server combined with your CGI script as being
equivalent to a scriptable application.
I'd suggest starting with an existing demo script (IIRC, ACGI
Dispatcher comes with some), setting it up according to the provided
documentation and studying how it works before you try to write your
own. It's much easier to understand how [A]CGI works once you've seen
it in action.
HTH
has
--
http://appscript.sourceforge.net
http://rb-appscript.rubyforge.org
_______________________________________________
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