Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!rpi!image.soe.clarkson.edu!sunybcs!boulder!rieman From: rieman@boulder.Colorado.EDU (John Rieman) Newsgroups: comp.sys.mac.hypercard Subject: Re: card names Message-ID: <15455@boulder.Colorado.EDU> Date: 8 Jan 90 23:16:57 GMT References: <52879@srcsip.UUCP> Sender: news@boulder.Colorado.EDU Reply-To: rieman@boulder.Colorado.EDU (John Rieman) Organization: University of Colorado, Boulder Lines: 33 In article <52879@srcsip.UUCP> leilaj@SRC.Honeywell.COM (Leila Johannesen) writes: >... I wrote: > >get the name of this card >put it into Message >if it is "myname" then > beep >end if > >--it writes the card name into Message (with the word 'card' in front >of it) but doesn't think "myname" and it match. You're gonna kick yourself, since you've almost found the solution already. Hypercard doesn't think "myname" is a match for card "myname" because they are different strings! That is, the message shows exactly the string that is currently in "it." To make the script work, either use: get the short name of this card which will return 'myname' (no quotes at all) instead of 'card "myname"'; or else (to be perverse), write the test as: if it is "card" && quote & "myname" & quote then beep end if -john rieman@boulder.colorado.edu U. of Colorado