CGI and find

Dar Scott dsc at swcp.com
Tue Sep 2 17:32:01 EDT 2003


On Tuesday, September 2, 2003, at 03:54 PM, J. Landman Gay wrote:

> On 9/2/03 4:07 PM, Dar Scott wrote:
>
>>  From the doc:
>>> When the search is successful, the card containing the text appears 
>>> and a box is drawn around the found text.
>> One might interpret this as saying 'find' is a gui command.
>
> I sort of got it to work.

With the Darwin engine from the MC site, I got this...

Script:

on startup
   write "Version" && the version & lineFeed to stdout
   write "before start using" & lineFeed to stdout
   start using "findtest.rev"
   write "after start using" & lineFeed to stdout
   send "delayed" to me in 0 seconds
end startup

on delayed
    try
     write "before find" & lineFeed to stdout
     find "roger"
     write "after find" & lineFeed to stdout
   catch e
     write "Error:" & e & lineFeed to stdout
   end try
   write the result & lineFeed to stdout
end delayed

Result:

Version 2.5
before start using
after start using
before find
./mc exiting on signal 10

I tried it with and without the try and I tried it with open instead of 
'start using'.  I tried it with the find in startup instead of the 
delay handler.

Where is your find script? In the library stack?

Dar Scott








More information about the use-livecode mailing list