• 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: Passing a variable from a webpage to an AppleScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Passing a variable from a webpage to an AppleScript


  • Subject: Re: Passing a variable from a webpage to an AppleScript
  • From: JJ <email@hidden>
  • Date: Thu, 25 Oct 2001 18:34:42 +0200

> I am using "SiteCam" for my webserver. It has the ability to run
> AppleScripts connected to a webpage as I've described above.
>
> It all boils down to this: I am going to trigger a script by clicking on
> a link. I want the pass AppleScript the text of what I clicked on. Can I?

I've been asking the same question the last weeks. No answers, but I can say
two things:
If you possess a webserver, the work is so easy: use cgi apps.
i.e.
web page:
<a href="applescript.cgi?cd=25&song=track2>Good Golly, Miss Molly</a>

applescript.cgi
on handle CGI request path_args searching for s_args
-- s_args -> ?cd=25&song=track2
-- parse args
-- tell any app
-- open cd 25, track 2
end handle CGI request

If you don't possess a webserver, then you could look at MacScripter.net for
an applescript called "TelProtocolHandler", by Guido Tonini. Basically, it
explains how configure a new protocol controlled by your own applescript.
(i.e., if you want your machine to open "hotline:" protocol with Hotline
Client, then you must configure your preferences in order to do it). You
should invent a new protocol ("johnny:") controlled by an applescript app,
which will receive the variables from, i.e., a form or simple link.

JJ


  • Prev by Date: Re: how to set an item to invisible
  • Next by Date: Re: any way to tell if a script has a 'return' statement?
  • Previous by thread: Passing a variable from a webpage to an AppleScript
  • Next by thread: Re: Passing a variable from a webpage to an AppleScript
  • Index(es):
    • Date
    • Thread