I don't know all your premises, but if you can live without Applescript,
why not simply use Text > Run Unix Command… with this:

cd /path/to/folder; cat *.txt

You could even just write cd and drag your folder from the Finder into the
Shell Worksheet (while holding cmd). BBEdit will insert the file path for
you.

Maybe worth a try.
Regards
Roland

On Fri, Nov 10, 2023 at 2:28 AM PDeL <g...@delancie.net> wrote:

> I’m trying to create an AppleScript that will do the following in BBEdit:
> 1. From the Edit menu (in an open file), choose Insert » File Contents…
> 2. In the resulting dialog, navigate to a given folder
> 3. Once at the desired folder, select all of the listed files
> 4. Insert the contents of the files
>
> I’m encountering the following difficulties (I’ve tried both recording the
> steps and just coding them):
> • “File Contents…” is not recognized as a menu item (must use the more
> brittle “menu item 1”)
> • Don’t know how to navigate the dialog to the desired directory.
> • Can’t find how to select all files in the dialog’s current directory.
>
> Any guidance anyone could give would be most welcome ;-)
>
> --
> This is the BBEdit Talk public discussion group. If you have a feature
> request or need technical support, please email "supp...@barebones.com"
> rather than posting here. Follow @bbedit on Twitter: <
> https://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 bbedit+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/bbedit/23e05ce0-4b81-4ee9-bd00-1a6a17e24c20n%40googlegroups.com
> <https://groups.google.com/d/msgid/bbedit/23e05ce0-4b81-4ee9-bd00-1a6a17e24c20n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "supp...@barebones.com" rather than 
posting here. Follow @bbedit on Twitter: <https://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 bbedit+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/CABybPXYTKc28_4MzM067E8y1OP3jSc_hjewBLbMxJ1joXDdCWw%40mail.gmail.com.

Reply via email to