There is a revFindNext handler but it is buried in the script of the Script Editor. Or at least it was there 21 years ago when Ken Ray made the following post
Jm Lambert > Date: Wed, 18 May 2005 11:34:26 -0500 > From: Ken Ray <[email protected] <mailto:[email protected]>> > Subject: Re: What is the script for selecting a specific word in a > field? > To: Use Revolution List <[email protected] > <mailto:[email protected]>> > Message-ID: <beb0d8c2.1e6cb%[email protected] > <mailto:beb0d8c2.1e6cb%[email protected]>> > Content-Type: text/plain; charset="US-ASCII" > > On 5/18/05 10:44 AM, "Robert Ball" <[email protected] <mailto:[email protected]>> > wrote: > >> Hello Eric from Paris, thank you so much for responding to my request >> for help. Apparently I did not make clear exactly what I want to do in >> my first message, so here is my second attempt. > > Hey, Robert... welcome to the list! John Ridge gave you the answer that is > close to what I would have given you: > > on tabKey > find word xxx in field "YourAnswer" > select the foundText > end tabKey > > which causes Rev to find and put a box around the text, and then highlight > the text, removing the box. You *do* see the box appear very briefly, but > the end result is what you want. To make it cleaner, wrap this with "lock > screen/unlock screen": > > on tabKey > lock screen > find word xxx in field "YourAnswer" > select the foundText > unlock screen > end tabKey > > I think what Eric was trying to suggest to you is that since the Revolution > IDE is scripted in Transcript as well, and that the IDE is open for you to > look at how Runtime Revolution scripted it, many times you can look into the > scripts of the IDE to get the functionality you're looking for (or at least > a starting place from which you can modify the code to suit your needs). > > In this case, the script editor windows have a Find feature that does what > you're looking for (type in text in the find field and click the Find > button, it highlights (but doesn't box) the found text). However to actually > get into the script to look at it is a bit convoluted (you need to set the > pref that Eric identified, open a script editing window, find out the name > of it, set it to topLevel so contextual menus will work on it, then use the > contextual menu to edit the card script, find the revFindNext handler, and > examine it), and the script doesn't use the "find word"/"select the > foundtext" solution presented above. Instead, it uses "offset" to locate the > word that should be selected, and then uses "select" to select a character > range in the field. > > Both ways work, but the find/select is probably the simplest and easiest. > > Keep posting your questions to the list; we have a great bunch of people > here who are extremely helpful. > > > Ken Ray > Sons of Thunder Software > Web site: http://www.sonsothunder.com/ > Email: [email protected] <mailto:[email protected]> _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
