request for script or stack

Sarah Reichelt sarahr at genesearch.com.au
Wed Jul 27 22:30:53 EDT 2005


Hi Tim,

> I'm sorry to whine, but I really miss my hyperCard command-F. The  
> cursor was positioned in the message box to type my search term,  
> between quotation marks, and away I went. Hit the return key for  
> the next hit if I don't like the item I just found. Hit the return  
> key as many times as I want.
>
> It worked about the same as typing
>
> find "confabulation"
>
> in Rev's message box. I think Rev is somewhat slower, but I can  
> live with that. What I don't like is having to type the whole  
> darned find command, including the quotation marks.

Here is a script to do it:

  go to cd "Single Line" of stack "Message Box"
  put "find " & quote & quote into fld "Message Field" \
    of cd "Single Line" of stack "Message Box"
  put " select char 7 to 6 of fld " & quote & "Message Field" \
    & quote & " of cd " & quote & "Single Line" & quote & " of stack " \
    & quote & "Message Box" & quote into tCmd
  send tCmd to me in 2 ticks

It doesn't set the hilite in the correct button at the top of the  
message box & it doesn't set the title, but it gets you to the single  
line entry, puts in the find and selects between the quotes.

The delay in selecting is required because the message box remembers  
your last selectedChunk and puts that back, so I have to wait until  
that has happened before over-riding it.

On my web page <http://www.troz.net/Rev/>, you will find a plugin  
called "FunKey" that allows you to allocate script snippets to  
certain function keys. You may find that if you attach this script to  
a function key, you have exactly what you want :-)

>
> Rev's command-F find window remains much slower than the Find  
> command in the message box, even if both searches are restricted to  
> the same stack and to field text only. I can't imagine why. I just  
> tested it. I searched for "Gloria" in a fairly bulky stack that  
> contains a lot of names. Typing find "gloria" in the message box  
> found four instances almost instantly.
>
> Then I tried find "gloria" with Rev's command-F "Find and Replace"  
> window. I clicked "field text" only, I chose "this stack" only, and  
> I checked "obey dontsearch properties." It was at least 1000 times  
> slower, maybe 5000 times slower, or more. And, in 2.6.1, it's still  
> not possible to abort a search in this window once you start one.  
> If you accidentally start the wrong search, you could grow a beard  
> before it was done searching.
It is just a script, so it can be stopped by Command-period, or  
whatever you usually use to stop a script.

Cheers,
Sarah

***************************
Sarah Reichelt
sarah at troz.net
http://www.troz.net/Rev/
***************************





More information about the use-livecode mailing list