On 13 dec 2008, at 18:54, gshenaut wrote: >> That is not the problem, the tell application "BBEdit" part is >> causing >> the trouble. > > Ah, OK, I understand that at least. I did try telling other > applications and the result was confusing and not useful.
After trying this myself: not at all possible, not without special preparation. > But wouldn't you still have to do a "tell app \"bbedit\"" or the > equivalent even if it was all applescript? (As I said, I'm at a loss > in applescript.) AppleScript is an extremely frustrating programming language (and I'm using the term loosely here), and I've written quite a few of them. The syntax is never quite what I expected. However, if you do it all in AppleScript, then BBEdit does respond to Applevents. It has to, AppleEvents are how AppleScript work. I've put in a feature request about two years ago I think, requesting that AppleEvents are processed while a unix filter or script is running. That would allow ne to replace AppleScript with Python (or Ruby, pick your favourite). These use special libraries and a link with the window-server to allow user interaction. > And I also don't know how in applescript to feed the selected text > into the shell command's standard input and then to replace the > selection with the command's standard output. From AppleScript, anything is possible. You can get the currently selected text, manipulate it, and replace it with the result. However, feeding it into a shell command is the part that will be hard. I usually send it to the terminal from AppleScript, because I know that it will be properly configured. Hopefully the kind folks at Bare Bones have some solution. Best, Maarten --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/bbedit?hl=en If you have a specific feature request or would like to report a suspected (or confirmed) problem with the software, please email to "[email protected]" rather than posting to the group. -~----------~----~----~----~------~----~------~--~---
