1 of 1 people found this helpful
The only step that jumps to mind is Scroll Window (To Selection) which implies that you must use Set Selection () and find a way to count through to the requested 'occurrence' of the searchText.
Take a look at Ray Cologon's HiLite Text custom function, which might be helpful to you. http://www.briandunning.com/cf/13
-- Drew Tenenholz
Yes, you can. Use a script with two script steps:
- Go to Field [ Table::FieldYouSearch ]
- Perform Find / Replace [ Table::YourGlobalSearchField ; Find Next ]
It will scroll the field to the text match. You could obviate the need for this much complexity and give them a "find" button which pops up the native search / replace dialog... it's so similar to what's in other word processing apps, most people will understand it, but it does have scripted options that can limit their earch to find's only, which is nice.
As the name implies, the Scroll Window script step applies to an entire FileMaker window, not a specific Edit Box.
Ray's HiLite Text custom function appears to offer the ability to make the search text stand out, which should make manual scrolling more feasible. For example, on a Mac, Safari's Find highlights all occurrences of the search string. I sometimes scroll the browser window instead of using the keyboard shortcut for Find Next.
Thanks, Drew, for the link to Ray's promising function.
It would still be great to find a way to automate Edit Box scrolling.