On Oct 9, 2008, at 7:40 PM, Doug McNutt wrote:

> Coming from MPW I am really frustrated that I can't execute a perl  
> script from within an HTML document that I have opened. I have to do  
> that in a worksheet that isn't the same as any other BBEdit  
> document. Cheez. Why not?

Maybe this is not exactly what you're looking for, but I have a simple  
AppleScript that allows the current selection, or current line if  
there is no selection, to be executed as a shell command within any  
BBEdit text window, including the new scratchpad in version 9. This is  
accomplished by passing the input to AppleScript's "do shell script"  
command.

Furthermore, if the document's source language is set to PHP/HTML,  
Perl, or Ruby, the appropriate command line interpreter will be used  
to execute the input (e.g. "perl -e" for a document with its source  
language set to Perl).

I'm sure my script could be improved (and I encourage you to share any  
improvements you might add), but it has served me quite nicely for  
over a year now. It's very handy to be able to select a line of code  
and hit a quick keyboard shortcut to execute it in place (I use Cmd- 
Opt-Ctrl-Return).

If you're interested, you can download the script here:

    http://web.me.com/dennisrande/downloads/Run%20Shell%20Command.zip

-Dennis



--~--~---------~--~----~------------~-------~--~----~
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.
-~----------~----~----~----~------~----~------~--~---

Reply via email to