Better solution.

BBEdit + Activata.co.uk (Autopilot)

On Oct 8, 8:02 pm, jdx2172 <[email protected]> wrote:
> I had played with applescript a while ago.
> It is good to a certain extent.
> For text processing I find python, perl or ruby easier.
>
> Thanks for the command B shortcut, I didnt know about that.
>
> I am still trying to figure a way to prompt a user typing parameters
> for a custom calculation like the one mentioned in my previous post
>
> A formula prompt like in excel ( a tool tip showing the order of
> arguments in a formula as the user types it would have been great)
>
> A code completion pop up like in RAD code editors like dreamweaver or
> RB that prompts a user when they typed the dot after a set of
> characters would have been better.
>
> Another thought using bbedit text clipping was like this..
>
> Let the user type something like [calc.ctok]
> Press command B and run the unix filter.
> Let unix run an applescript to insert a clipping like [calc.ctok
> <#temp_in_celsius>]
> so user can tab through the parameters for the calculation
> then run command B and run unix filter to do the calculation
>
> Its just a thought storyboard-ed..
> Any suggestions please...
>
> On Oct 8, 5:32 pm, peter boardman <[email protected]> wrote:
>
> > On 8 Oct 2009, at 03:09, jdx2172 wrote:
>
> > > My feature request is to run a line of terminal command when the user
> > > presses a keyboard shortcut. The application of that is like this...
>
> > Basically you can script the BBEdit application using AppleScript, and/
> > or process any text (the selection or the whole document) using either  
> > AppleScript or a Unix filter.
>
> > For example, suppose you want to write a script that, when invoked  
> > (either from the script menu or with a key combination), finds a  
> > directory path in square brackets on the current line and inserts a  
> > listing of that directory, you'd probably write this:
>
> > tell application "BBEdit"
> >         tell front text window
> >                 set n to startDisplayLine of selection
> >                 set result to find "\\[(.*)\\]" searching in line n options 
> > {search  
> > mode:grep} with selecting match
> >                 if (found of result) then
> >                         set directory to grep substitution of "\\1"
> >                         set listing to do shell script "ls  " & "\"" & 
> > directory & "\""
> >                         set selection to listing
> >                 end if
> >         end tell
> > end tell
>
> > My AppleScript is rusty these days, but you get the idea. Because you  
> > want to talk to BBEdit, use AppleScript.
>
> > However, I personally prefer to just select some text manually (eg  
> > Command B to balance brackets) and run a Unix filter on that. Only the  
> > selection is passed to your Unix filter, so I'd probably tie a  
> > keystroke to that filter. This way you can do most of your string  
> > processing in your filter, and that could be easier than doing it in  
> > AppleScript.
>
> > :)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
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 feature request or would like to report a problem, 
please email "[email protected]" rather than posting to the group.
-~----------~----~----~----~------~----~------~--~---

Reply via email to