Page 1 of 1

Quick find

Posted: 2007-10-29 10:53:05
by lawrencegoodman
one of the features i like most about plain old fashioned text editors is that you can call up the find/replace dialogue, enter what you want it to find, it moves you to that word, and then the find box disappears automatically. it just saves you the annoyance of having to close the find box yourself.

i was wondering if it might be possible to create a macro that asked the user for a find string, found the string, and then the window disappeared and you could start typing. the other cool thing would be for the find string you entered to become the default find value so if you hit command+g it will search again for the find string you entered when the macro ran.

just a thought. thanks.

Posted: 2007-10-29 14:29:45
by martin
This should do the trick:

Code: Select all

$search = Read Find Expression
$search = Prompt Input “What would you like to search for?”, “Please enter the text you would like to search your document for.”, “Find”, $search
Write Find Expression $search
Find $search

Posted: 2007-10-29 15:55:38
by lawrencegoodman
Fantastic. Thanks. Who knew it would be so easy?