Thanks Chris it works perfectly, unfortunately I am not an Applescript expert … 
and I used TextWranglers and now Bbedit trying to adjust the Applescript 
recordings with the little I knew … 
Dante
> On 11 Jan 2019, at 22:31, Christopher Stone <[email protected]> 
> wrote:
> 
> On 01/11/2019, at 14:43, Dante Majorana <[email protected] 
> <mailto:[email protected]>> wrote:
>> I open from a folder a series of files all included in one folder. Hence I 
>> have window with a number of files as documents.
> 
> 
> Hey Dante,
> 
> BBEdit is very recordable, but recording is really only good for getting the 
> general syntax of things.
> 
> To produce a finished script you have to know what you're doing and know what 
> to leave in, what to take out, and what to add.
> 
> This comes with experience.
> 
> Try this script and see if it does what you want – make sure to test with 
> TEST copies.
> 
> ----------------------------------------------------------------
> # Auth: Christopher Stone
> # dCre: 2019/01/11 15:27
> # dMod: 2019/01/11 15:27 
> # Appl: BBEdit
> # Task: Prepend Document Name to Document Text.
> # Libs: None
> # Osax: None
> # Tags: @Applescript, @Script, @BBEdit, @Prepend, @Document, @Name, @Text
> ----------------------------------------------------------------
> 
> tell application "BBEdit"
>     
>     set frontWin to front text window
>     set docIDList to ID of documents of frontWin whose on disk is true
>     
>     repeat with docID in docIDList
>         tell document id docID
>             set before its text to its name & linefeed
>         end tell
>     end repeat
>     
> end tell
> 
> ----------------------------------------------------------------
> 
> --
> Best Regards,
> Chris
> 
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a 
> feature request or need technical support, please email
> "[email protected]" rather than posting to the group.
> Follow @bbedit on Twitter: <https://www.twitter.com/bbedit 
> <https://www.twitter.com/bbedit>>
> --- 
> You received this message because you are subscribed to the Google Groups 
> "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at https://groups.google.com/group/bbedit 
> <https://groups.google.com/group/bbedit>.

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or need technical support, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <https://www.twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to