home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!mips!swrinde!cs.utexas.edu!sun-barr!ames!data.nas.nasa.gov!taligent!apple!mumbo.apple.com!gallant.apple.com!NewsWatcher!user
- From: jpugh@apple.com (Jon Pugh)
- Newsgroups: comp.sys.mac.hypercard
- Subject: Re: Sending AEs to hypercard
- Message-ID: <jpugh-180892213928@90.20.3.212>
- Date: 19 Aug 92 04:49:23 GMT
- References: <EeYJUtS00iUx04XlJV@andrew.cmu.edu>
- Sender: news@gallant.apple.com
- Followup-To: comp.sys.mac.hypercard
- Organization: Apple Computer, Inc.
- Lines: 28
-
- In article <EeYJUtS00iUx04XlJV@andrew.cmu.edu>, gb2a+@andrew.cmu.edu
- (George J. Baxter) wrote:
- >
- > Gurus:
- > I want to send a string to Hypercard. I'm using hypercard as a
- > front end and I want to send back an error message if I get one. I
- > don't want Hypercard to wait around in any XCMD while I'm looking for my
- > error string since there might not be one, or it might be a long time
- > coming. So I want to use Hypercard's built in AE handlers. I know that
- > 2.1 supports appleEvents, but how specifically do I address the AE
- > handler in hypercard? The little New Features Guide gives me some
- > hints. For example, I could send the appleEvent under class 'misc', and
- > ID 'dosc' with my string being "put <my error string here>"
- > or something. The question I have is where do I put this error string?
- > The 'dosc' ID is described as "interpret the return-delimited list
- > accompanying this Apple event as a script and execute it."
-
- You need to create the string "put" && quote & yourString & quote and send
- that to Hypercard as the direct parameter (keyword '----') to the
- 'miscdosc' event. That will force Hypercard to execute the string you
- passed.
-
- The "request" command sends a "misceval" event with a function or
- expression as the direct parameter. Hypercard will evaluate the expression
- and return the value as a string in the keyAEResult parameter (also '----')
- of the reply event.
-
- Jon
-