Program Linking

Ben Rubinstein benr_mc at cogapp.com
Tue Mar 12 18:14:01 EST 2002


on 12/3/02 6:10 PM, Ken Norris (dialup) at pixelbird at interisland.net wrote:

> HyperCard has an 'answer file' command that should do this on a Mac. I don't
> have Rev open, but are you saying it doesn't support that command?

Different command.  'Answer file', fully supported in Rev, brings up the
standard dialog to select an existing file.  If you didn't have it, you
could build one yourself, using "the files" and "the folders". 'Answer
program', not supported at all in Rev/MC, is the standard dialog provided on
MacOS to select a program to talk AppleEvents with, including programs
running on remote machines.  There is no way to replicate this functionality
within Transcript - hence it would be useful to have.

 
on 12/3/02 6:01 PM, Richard Gaskin at ambassador at FourthWorld.com wrote:

> If you need your app to communicate with another Mac app using AE
> specifically, you can probably do just about anything you'd need with either
> Rev's built-in support for 'dosc' ("do script", for commands) and 'eval'
> ("evaluate", for functions) Apple events, or with AppleScript.

Absolutely - but if you want to use that functionality to do something to
another program, allowing the user to select the target app, you need
'answer program'.


> Other programmers have told me that the "answer program" API is screwy under
> OS 9, which may be why it's not more widely supported.  I don't recall
> seeing it in anything but SuperCard, HyperCard, and an old stats graphing
> program called Spyglass many years ago, and if there's a newer app that
> provides this I'd be interesting in learning about it.

First I've heard of it - do you have any more info on this?  I've
experienced no problems with it on OS 9 or before.  You wouldn't expect to
see it in any apps other than those that support users creating applescripts
to control other apps (ie development environments like HC, SC, Rev, Script
Debugger, FaceSpan, Frontier... all of which support it.

> In the absence of "answer program", does "tell <programname>" in AS do what
> you need?

No; the two are complementary.  You use "answer program" to get the path to
the app that you then "tell" something to.

  Ben Rubinstein               |  Email: benr_mc at cogapp.com
  Cognitive Applications Ltd   |  Phone: +44 (0)1273-821600
  http://www.cogapp.com        |  Fax  : +44 (0)1273-728866





More information about the use-livecode mailing list