Is there any way to cause the same action as File > Open Selection from AppleScript?

I'm trying to write a script that will take lines of grep -n output, like:

[macintosh:~] > grep -nrie foo .
./path/to/file1.cpp:48:     foo->bar();
./path/to/file2.cpp:28:// foo

And automatically parse out the file and line number from the start of the (first) selected line and invoke File > Open Selection. Finding file and line number was pretty simple, but I've haven't yet been able to make the "open selection" part work.

I briefly tried doing UI scripting, but it seemed like my keyboard modifiers for the key I was assigning to the script were being picked up during UI scripting and getting in the way, both with menu click actions and by sending keys to the application.

--
Dennis



--
------------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_script.shtml>
List archives: <http://www.listsearch.com/bbeditscripting.lasso>
To unsubscribe, send mail to:  <[EMAIL PROTECTED]>

Reply via email to