Yes, that's the sort of direction I was trying to go with the 'as
alias' thing... My thoughts, a) create a string from the contents of
the selection, b) run the replace on the string, c) return the string,
which the clipping will replace the original selection with... I just
don't know much about applescript ;-)

My original attempt works, but also produces the error/alert.

v


On Aug 20, 6:33 pm, Christopher Stone <listmeis...@thestoneforge.com>
wrote:
> On Aug 20, 2011, at 15:54, verdonv wrote:> Thanks for the feedback and the 
> example. I like the simpler pattern too :-)
>
> ______________________________________________________________________
>
> Hey Verdon,
>
> You bet.
>
> > As to why I am activating it from a clipping, well because it is part of a 
> > bigger set of clippings. Clippings are the sensible method for most of the 
> > set. This one is the oddball, but I want to keep everything together in one 
> > toolbox, so to speak.
>
> If I understand the clipping/script mechanism correctly the script must 
> return a text value, which the clipping will emplace.
>
> The trouble is that your script acts on the selection, and then the clipping 
> wants to change the selection again to the output of the script.
>
> I was going to say that you could go ahead and get the selection after the 
> replace and return it, but there's some funky issue with whitespace getting 
> eaten.
>
> --
> Best Regards,
> Chris

-- 
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 bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
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 "supp...@barebones.com" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

Reply via email to