Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Help with CGI that triggers AppleScript

Help with CGI that triggers AppleScript
Thread Tools
Senior User
Join Date: Sep 2000
Location: Illinois
Status: Offline
Reply With Quote
May 1, 2002, 09:10 AM
 
Hey all,

I'm not the most experienced CGI person (or AppleScript person for that matter), but I did write an AppleScript that does some stuff on my WebServer... Now I want to be able to trigger it when someone hits a webpage... Anyone have any ideas (or know of any code already wrote and out there) that does something similar?

Thanks!
     
Professional Poster
Join Date: Oct 2000
Location: Toronto, ON
Status: Offline
Reply With Quote
May 1, 2002, 11:52 AM
 
What does the AppleScript do? I'm thinking a more specifically server-side solution like PHP might be better, but more details are appreciated.
The Lord said 'Peter, I can see your house from here.'
     
marusin  (op)
Senior User
Join Date: Sep 2000
Location: Illinois
Status: Offline
Reply With Quote
May 3, 2002, 10:58 AM
 
My AppleScript is taking what's currently playing on iTunes and updating a PHP file... The problem is that it only works when I physically call the script (it doesn't update on every song change nor do I want it to do that.. although I'd like to know how to do that!).

Basically, I want the script to trigger when someone hits the webpage (and a CGI program or something else runs and calls the AppleScript I have)... Any ideas?
     
Professional Poster
Join Date: Oct 2000
Location: Toronto, ON
Status: Offline
Reply With Quote
May 3, 2002, 02:42 PM
 
Talk to Xeo one of the moderators. He has a combination shell script (.sh file), AppleScript and PHP going that dynamically updates his signature graphic showing what he's currently listening to in iTunes!

See here for more info about how he does it.
The Lord said 'Peter, I can see your house from here.'
     
Fresh-Faced Recruit
Join Date: Nov 2001
Location: australia
Status: Offline
Reply With Quote
May 5, 2002, 04:48 PM
 
how about this place http://www.macasp.com/
_ _ _ _____________ _ _ _
Martin
     
marusin  (op)
Senior User
Join Date: Sep 2000
Location: Illinois
Status: Offline
Reply With Quote
May 10, 2002, 10:50 AM
 
I'm really trying to use a PHP/AppleScript solution... Once I get some time to mess around I'll figure it out...

Originally posted by nitram_again:
<STRONG>how about this place http://www.macasp.com/</STRONG>
     
Fresh-Faced Recruit
Join Date: Nov 2001
Location: australia
Status: Offline
Reply With Quote
May 13, 2002, 07:56 AM
 
Sorry. They never should have named it MacASP IMO...

You can use it to trigger Applescripts. From their site:

what MacASP is:

* a cgi that provides server side processing to Macintosh web servers
* a simple and easy to learn scripting language, similar to Basic
* designed to use specific functionnalities of Macintosh (like Applescript)
* Runs on MacOS 8.6 through 9.2.2 (classic version) and OSX (carbon version)


what MacASP is not:

* MacASP language is NOT compatible with Microsoft ASP (Active server pages)
* MacASP runs only on Macintosh PPC computers


It's currently in Final Candidate, let's have a look at the features:

* works on mac web servers (tested with WebStar 3, 4 and V, WebTen, macHTTP, Apache and Personal Web Sharing)
* FREE for use with Personal Web Sharing and MacHTTP
* no system extensions, no plugs, just a cgi for a no frills and instant install
* no browser incompatibilities, processing being done server-side
* Virtual hosting compliant
* multi-threaded
* automatic session handling
* no more cgi coding, all your code is included in tags from your page
* easy to learn language (basic like)
* unlimited variables, scope limited to the subroutine, the page or the session
* unlimited session scope arrays
* PowerKey/Rebound compatible
* Database (embedded, ODBC and access to any remote servers on NT)
* mail (send and read)
* Automatic file upload handling
* source level integrated debugger
* OSA support (Applescript)
_ _ _ _____________ _ _ _
Martin
     
marusin  (op)
Senior User
Join Date: Sep 2000
Location: Illinois
Status: Offline
Reply With Quote
May 14, 2002, 04:10 PM
 
In that case, I'll have to check it out... Thanks for the link..

Originally posted by nitram_again:
<STRONG>Sorry. They never should have named it MacASP IMO...
You can use it to trigger Applescripts. From their site:
</STRONG>
[ 05-14-2002: Message edited by: marusin ]
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 10:34 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2