Here is some Flash Builder script that does basic text search functionality.
It will find the index of the search and scroll a TextArea component to the String.
I'm using "indexOf" and "lastIndexOf" to perform the next and previous searches. I'd like to use Regular Expressions to find the next and previous occurrences in my search, but did not figure that out or know if it's possible to apply it for this.
If anyone knows a faster way let me know.
Dana Barrett: Are you the Keymaster?
Dr. Peter Venkman: Yes. Actually I'm a friend of his, he asked me to meet him here.
-Ghostbusters
It's been a whole year since I needed to use the KeyManager class and from comments I've been made aware of bugs in my script.
I was hoping the scripts would be a sufficient start that should issues arrive, others would come up with work-a-rounds. (Thank you to all who noted solutions and problems.)
Lately I was needing to write some keyboard interactivity again and I wanted to add some features to help simplify newer task...also fix a couple of things in the process.
In Flex, a lot of coding deals with listening to events. The KeyManager needed events for the tasks I was working on. Callback functions where ok at first but adding "KEY_DOWN", "KEY_UP" and "KEY_SEQUENCE" events help make the class more useful for monitoring status. Monitoring events give more options for handling keyboard activity in one handler function versus using a separate function for each keyboard combination. So now I've updated the class to have both. Read the rest of this entry »
For most situations when I want to only execute code of an application running from the editor, I use regular expressions to check the application's url.
You could use other regular expressions for your own situation.