clubmac@runx.ips.oz (Macintosh Users Group) (12/07/87)
I was asked this question by a guy on the weekend, and was unable to help him. Any of you Hypercard gurus able to answer?? "I want to have a BACKGROUND button which has a script that tries to FIND an arbitrary text. However, when I try it, it only finds the text in BACKGROUND fields, not FOREGROUND. The FIND works properly when you use the MESSAGE box.. how come?" The guy concerned was not a programmer and so was quite pissed off that Apple had dangled this carrot in front of him (let him actually program up an application that suited his needs) and then taken it away (by introducing stupid bugs that, quite frankly, a non-programmer can live without... Jeff Laing (where for art thou comp.sys.mac.hypercard?) Club Mac Macintosh Users Group, Sydney, Australia Phone Home: +61-2-73-4444 Snail: Box 213, Holme Building, Sydney University, NSW, 2006, Australia ACSnet: clubmac@runx.ips.oz ARPA: clubmac%runx.ips.oz@uunet.css.gov UUCP:{enea,hplabs,mcvax,prlb2,uunet,ubc-vision,ukc}!munnari!runx.ips.oz!clubmac
paulm@nikhefk.UUCP (Paul Molenaar) (12/09/87)
In article <1262@runx.ips.oz>, clubmac@runx.ips.oz (Macintosh Users Group) writes: > > I was asked this question by a guy on the weekend, and was unable to help > him. Any of you Hypercard gurus able to answer?? > > "I want to have a BACKGROUND button which has a script that tries to FIND > an arbitrary text. However, when I try it, it only finds the text in > BACKGROUND fields, not FOREGROUND. The FIND works properly when you use > the MESSAGE box.. how come?" > > Jeff Laing (where for art thou comp.sys.mac.hypercard?) > Same problem here. I noticed that strange Find bug too. My solution is a real kludge, but it works. Instead of issuing the FIND command in script, TYPE the FIND command with all the arguments into the message box and then (again from script) add a return. Like: on mouseUp type "FIND" && quote & key & quote && "in background field id" && number & return end mouseUp This also makes the repeated FIND easier. I made a stack that needed a search option on partial keys. So I wanted HC to keep on looking when the user stated that the item found wasn't the right one. I made a script to do this (if interested I can mail/post it) that expects a second field for every field to be looked in. The item found is put in the second field (named something like showName). When the user says he wants to keep on searching, the next item found is compared to the contents of showName. If it's the same, my script says that 'it's all there is'. And cancels the search. Otherwise a repeated search would be impossible. If you like I can upload the lot. To comp.sys.mac.hypercard maybe? To Apple: Why do you reply to all the easy answers in comp.sys.mac.hypercard bu happily skip all the possibly difficult ones? Seems like the HyperCard group chooses the easy way out. Too many bugs in HC perhaps? -- Paul Molenaar "Just checking the walls" - Basil Fawlty -