How to change default action in Find Nearby Words.nwm–Solved
Posted: 2013-10-18 08:54:58
Hi, I find the attached Find Nearby Words macro very, very useful - thanks again Martin.
Yet I always want the expression put into the Find panel, so I can modify it later if needed.
How do I modify this section so the default action changes and the expression, by default, goes into the Find panel?
# ask user what to do
$button = Prompt 'What should be done with those words?', '', 'Find All', 'Set In Find Panel'
$expression = "$first(AnyTextCharacter)(1+ Shortest)$second(Or)$second(AnyTextCharacter)(1+ Shortest)$first"
If $button == 'Set In Find Panel'
Write Find Expression $expression
Show Find
Exit
End
Thanks for your help,
Cris
Yet I always want the expression put into the Find panel, so I can modify it later if needed.
How do I modify this section so the default action changes and the expression, by default, goes into the Find panel?
# ask user what to do
$button = Prompt 'What should be done with those words?', '', 'Find All', 'Set In Find Panel'
$expression = "$first(AnyTextCharacter)(1+ Shortest)$second(Or)$second(AnyTextCharacter)(1+ Shortest)$first"
If $button == 'Set In Find Panel'
Write Find Expression $expression
Show Find
Exit
End
Thanks for your help,
Cris