Hi,

nice applescript solution to this paste-select problem from Kendall. I'd like 
to offer another way using clippings. Just create a clipping with the following 
content:

#SELSTART##CLIPBOARD##SELEND#

Saving it under "Universal Items" is recommended. With an assigned keyboard 
shortcut it should do exactly what you want. (Checking out the Clippings 
section in the manual is also highly recommended.)

many ways lead to Rome,
Roland


Am 06.08.2010 um 6, 01:51 schrieb Kendall Conrad:

> I went ahead and tried coding up my second suggestion. It was really
> easy actually. I haven't done a ton of testing with it, but seems
> pretty good. Just select your content and run this script and it will
> paste it into the document and select it.
> 
> tell application "BBEdit" to tell front window
>       -- Ensure clipboard is not empty
>       if (length of (contents of (the clipboard as text))) = 0 then return
>       tell the selection to set offset1 to characterOffset
>       paste
>       tell the selection to set offset2 to characterOffset
>       select (characters offset1 through (offset2 - 1))
> end tell
> 
> -Kendall
> 
> On Aug 5, 4:47 pm, Kendall Conrad <angelw...@gmail.com> wrote:
>> One idea. Create some AppleScript that does a Special Paste that finds
>> out what column you're using indented at then applies the indentation
>> to to everything after the first line of the text on the clipboard,
>> then pastes the resulting text into the document. So it doesn't
>> directly do what you want, but allows you to pre-process rather than
>> post-process.
>> 
>> I suppose you may be able to create a different kind of script that
>> records the initial cursor position, and after pasting, will select
>> back to that point. I think that's doable and would be less code than
>> the above idea.
>> 
>> -Kendall
>> 
> 
> -- 
> 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.

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

Reply via email to