HyperCard Basics

Jonathan Cooper drdada at gmail.com
Thu Sep 18 04:52:35 EDT 2014


I loved the simplicity of HyperCard's cmd-F "Find", so I created my own in LiveCode:

on commandKeyDown whichKey
   switch whichKey
      case "e"
         global prevFindString
         ask "Find:" with prevFindString
         find it
         if the result <> "" then beep
         put it into prevFindString
         break
      case "g"
         global prevFindString
         find prevFindString
      default
         pass commandKeyDown
   end switch
end commandKeyDown

Now, when I want to find some text in the current stack, I press cmd-E, start typing, press enter. To find subsequent occurrences, I press cmd-G.

I tried scripting the message-box, to make it work just like HyperCard, but I couldn't get it to work for some reason. Can't remember why – it was a long time ago (when LiveCode was still called "Revolution").

Jonathan

Jonathan Cooper
www.doctordada.com

On 18/09/2014, at 9:18 AM, use-livecode-request at lists.runrev.com wrote:

> -- It is true that there is no "go" menu, and you have to script your own find. What has replaced it, with cmd-F, is the find and replace gadget. Much more flexible and powerful, if less quaint.




More information about the use-livecode mailing list