System Events can change some metadata. After giving the appropriate 
permissions, this works to set a file to open with TextEdit rather than BBedit. 

tell application "System Events"
        set default application of file "/Users/fletcher/Desktop/myfile.txt" to 
file "Smog:System:Applications:TextEdit.app:"
end tell

Presumably this would work to set the Creator Type but it's harder for me to 
test.

tell application "System Events"
        set creator type of file "/Users/fletcher/Desktop/myfile.txt.txt" to 
«class TBB6»
end tell

Hope this helps,

[fletcher]

> On Aug 16, 2023, at 4:01 PM, Eric <eric.pj.wri...@gmail.com> wrote:
> 
> Hi,
> For context I have n AS that changes the creator type of a text file using 
> Tex-Edit Plus which is no longer useable in Monterey so that Indesign 
> recognises it.
> The line is
>> save window 1 in file ResultFile as string with creator «class TBB6» with 
>> unstyled formatting
> Is there an equivalent in BBEdit ?
> 
> The script snippet is here
>> Various script steps preceding defining variables
>> ————
>> (*Process the file for InDesign*)
>> tell application "Tex-Edit Plus"
>> activate
>> open file SourceFile
>> save window 1 in file ResultFile as string with creator «class TBB6» with 
>> unstyled formatting
>> close window 1 saving no
>> end tell
>> tell application "Finder"
>> activate
>> end tell
> —————— 
> Thanks.
> Kind Regards
> Eric
> 
> 
> -- 
> 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 
> <mailto:bbedit+unsubscr...@googlegroups.com>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/bbedit/3ce0d94f-6111-47d2-ba8c-b7cafff0cd51n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/bbedit/3ce0d94f-6111-47d2-ba8c-b7cafff0cd51n%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/B43B60BE-95E3-4952-9CA6-45CDACF0F1F1%40cumuli.com.

Reply via email to