Or why not use the Text -> Prefix/Suffix Lines menu item? 2009/10/30, Semper Fidelis <[email protected]>: > > Chris~ > > Why not use a simple grep to do it for you? This works for me: > > - - - - - - - - - - - - - - - - - - - - > > Find: > > (^.+) > > Replace: > > •\1 > > - - - - - - - - - - - - - - - - - - - - > > Cheers, > > ~Semper Fi, Mac! > > = = = = = = = = = = = = = = = = = = = = > > On Oct 29, 2009, at 11:44 PM, Christopher Stone wrote: > > > > > Hey Folks, > > Jeeze. It's been a long time since I seriously scripted BBEdit. In this > case I want to prefix every line in the front document. > > This works fine: > > > tell application "BBEdit" > tell front text document > set before first word of line 3 to "•" > end tell > end tell > > This doesn't: > > > tell application "BBEdit" > set before first word of every line of front text document to "•" > end tell > > This does the job perfectly: > > > tell application "BBEdit" > tell front text document > add prefix ( lines 1 thru -1 ) prefix "•" > end tell > end tell > > And you can loop through or do a find/replace of course. All this > discovered, and I still feel like I'm missing something. Any more useful > magic? > > Thanks. > > > -- > 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 [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. -~----------~----~----~----~------~----~------~--~---
