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.

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

Thank you Jean!

You gave me the confidence to give this a try. Something like this did actually cross my mind - no idea of the syntax though. On top of the inherent self doubt I just thought I was so far out in the tulies that there was just no way this was the way to go.

Absolutely no slight to BBEdit (at all) because I did not know if I was an edge case or not. I could care less what the solution ended up being. The fact that there *is* a solution just
reaffirms the depth of BBEdit and a welcoming community.

--
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/p06240800e2e2a38f2c75%40%5B192.168.1.208%5D.

Reply via email to