Hi Robert,

You could do this with a snippet of AppleScript like so:

*try*

*tell* *application* "BBEdit"

-- Replace <user> and <my_beautiful> with your user's name and 
textfactory's name.

*set* vTextFactory *to* *POSIX file* "/Users/<user>/Library/Application 
Support/BBEdit/Text Factories/<my_beautiful>.textfactory"

*repeat* *with* vDocument *in* *its* *text documents* *as* *list*

*apply text factory* vTextFactory to vDocument saving *no*

*end* *repeat*

*end* *tell*

*on* *error* aMessage

*display alert* aMessage

*end* *try*

HTH,

Jean Jourdain
On Tuesday, August 13, 2024 at 9:14:22 PM UTC+2 Robert Schwalbe wrote:

> I hope this is not blatantly obvious because I certainly did put in 
> some time to
> come up with an answer by myself.
>
> Can a text factory work on a dynamic set of files?
>
> I have a text factory that performs a half dozen or so operations. In 
> my case all targeted
> files would be open, I then open the text factory, select Choose, 
> check "Open Editing
> Windows" and hit the Run button. Bingo Bango done!
>
> What I would like to do is still have my targeted files open, but 
> then just run a text factory
> (preferably sans any UI) and the text factory knows to operate on the 
> "Open Editing Windows"
> just as described above but without any of the interacting.
>
> Here's to some hopeful wishing!
>
> On the other hand, a pessimist is never disappointed.
>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or believe that the application isn't working correctly, please email 
"[email protected]" rather than posting here. Follow @bbedit on Mastodon: 
<https://mastodon.social/@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 view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/2767bdf7-eaa5-44d3-ab4c-90fda5215ff3n%40googlegroups.com.

Reply via email to