geb@cadre.dsl.pittsburgh.edu (Gordon E. Banks) (11/11/87)
It seems that although hypercard will accept card names typed in that are longer than 31 chars and display them in the card info window, the go to card xx command won't find the card unless the name is 31 chars or less. Is this right? Any way around it other than truncating the name string?
leilaj@SRC.Honeywell.COM (Leila Johannesen) (01/09/90)
Hi, I can't seem to be able to get the name of a card then have it test correctly in an "if" statement. Does anyone know how to do this? for example, 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. thanks, Leila
jdevoto@Apple.COM (Jeanne A. E. DeVoto) (01/09/90)
In article <52879@srcsip.UUCP> leilaj@SRC.Honeywell.COM (Leila Johannesen) writes: > >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. "The name of this card" returns an expression of the form card "foobar" which of course isn't identical to "foobar". To get just the name of a card, without surrounding quotes and the word "card" in front, use "the short name of this card". -- ====== jeanne a. e. devoto ======================================== jdevoto@apple.com | You may not distribute this article under a jdevoto@well.UUCP | compilation copyright without my permission. ___________________________________________________________________ Apple Computer and I are not authorized | CI$: 72411,165 to speak for each other. | AppleLink: SQA.TEST
rieman@boulder.Colorado.EDU (John Rieman) (01/09/90)
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" 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
rieman@boulder.Colorado.EDU (John Rieman) (01/09/90)
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
allen@codon1.berkeley.edu (Edward Allen;345 Mulford;x2-9025) (01/10/90)
In article <52879@srcsip.UUCP> leilaj@SRC.Honeywell.COM (Leila Johannesen) writes: > >Hi, > >I can't seem to be able to get the name of a card then have it >test correctly in an "if" statement. Does anyone know how to do this? (deleted example) >thanks, >Leila Say 'short name' instead of 'name'. Ed Allen (allen@enzyme.berkeley.edu)
mjm@eleazar.dartmouth.edu (Michael McClennen) (01/19/90)
In article <52879@srcsip.UUCP> leilaj@SRC.Honeywell.COM (Leila Johannesen) writes: >I can't seem to be able to get the name of a card then have it >test correctly in an "if" statement. Does anyone know how to do this? > >for example, I wrote: > >get the name of this card >put it into Message >if it is "myname" then > beep >end if Easily fixed. Substitute the following for line 1: get the short name of this card That will get you the proper string. Michael McClennen Dartmouth College Humanities Computing