Hi Rick,

Thank you. That’;s certainly the case. When I open it in Word it opens as rtf 
ands the header of the file spells it out.

So BBedit is the wrong replacement for Tex-Edit.

I’ve tried using Word itdsel in the script with our success but when I open the 
file in Word and Save As text it asks to confirm the encoding then works.

Works meaning Indesign recognises it as tagged text and formats on placement,

Do you know anything of scripting Word ?

Kind Regards
Eric


> On 18 Aug 2023, at 4:11 pm, Rick Gordon <[email protected]> wrote:
> 
> I suspect that either:
> 
> * It is not a text file; Tex-Edit Plus also handles RTF, DOC, and
>   AppleWorks files.
> 
> * It is a text file, but the text encoding is not matching what you've
>   chosen in BBEdit.
> 
> Rick Gordon
> 
> --------
> 
> On August 17, 2023 at 11:06:59 PM [-0700], Eric wrote in an email entitled 
> "Re: Bbedit Applescript command":
>> Ok last thing.
>> If I simply drag the SourceFile onto the TexEdit app it opens correctly 
>> formatted.
>> Drag it onto BBedit it doesn't.
>> Anyone know why ?
>> Kind Regards
>> Eric
>> 
>> 
>> On Friday, August 18, 2023 at 3:10:09 PM UTC+10 Eric wrote:
>> 
>>    Hi again,
>>    A bit more.
>> 
>>    I've stepped through the whole process and it is in this line that
>>    the necessary transformations done
>> 
>>    *save*/window/1 in/file/ResultFileas/string/with
>>    creator«/class/TBB6» *with* unstyled formatting
>> 
>> 
>>    Commenting out each phrase after ResultFile fails until it's all
>>    there. The works.
>> 
>>    Switching to BBedit starts with not compiling with the Creator
>>    Type phrase.
>>    Cutting that out and seeing I can force the string complies but
>>    fails to execute.
>>    "Can’t make file "xyz" of application "BBEdit" into type string.
>> 
>>    So I'm back to square one.
>>    How to reproduce that line in BBedit :(
>> 
>>    Kind Regards
>>    Eric
>> 
>> 
>>    On Friday, August 18, 2023 at 2:21:55 PM UTC+10 Eric wrote:
>> 
>>        Hi Fletcher,
>>        Thanks for responding.
>>        I think because I've been struggling to understand what's
>>        happening I've struggled to explain the problem.
>>        Assuming along the way that its just an app switch.
>>        But not quite so.
>>        Below is text messy but I've narrowed down the issue.
>>        The presenting problem is simply that in one case Indesign
>>        opens the import tagged text dialog and responds. In the other
>>        it misses that's tagged text coming in.
>> 
>>        So this Snippet transforms the text and works.
>> 
>>        (*Process the file for InDesign*)
>> 
>>        *tell* /application/"Tex-Edit Plus"
>> 
>>        *activate*
>> 
>>        *open*/file/SourceFile
>> 
>>        *save*/window/1 in/file/ResultFileas/string/with
>>        creator«/class/TBB6» *with* unstyled formatting
>> 
>>        *close*/window/1 saving/no/
>> 
>>        *end* *tell*
>> 
>>        *tell* /application/"Finder"
>> 
>>        *activate*
>> 
>>        *end* *tell*(*Process the file for InDesign*)
>> 
>>        *tell* /application/"Tex-Edit Plus"
>> 
>>        *activate*
>> 
>>        *open*/file/SourceFile
>> 
>>        *save*/window/1 in/file/ResultFileas/string/with
>>        creator«/class/TBB6» *with* unstyled formatting
>> 
>>        *close*/window/1 saving/no/
>> 
>>        *end* *tell*
>> 
>>        *tell* /application/"Finder"
>> 
>>        *activate*
>> 
>>        *end* *tell*
>> 
>> 
>>        Resultant text is
>>        _______
>>        <ASCII-MAC>
>>        
>> <Version:3.000000><FeatureSet:InDesign-Roman><ColorTable:=<Black:COLOR:CMYK:Process:0.000000,0.000000,0.000000,1.000000>
>>        etc etc with paragraphs and line feeds seperating text blocks
>>        ___________
>> 
>>        This Snippet using BBEdit
>> 
>>        (*Process the file for InDesign*)
>> 
>>        *tell* /application/"BBEdit"
>> 
>>        *activate*
>> 
>>        *open*/file/SourceFile
>> 
>>        *save*/text document/1 to/file/ResultFile
>> 
>>        *close*/window/1
>> 
>>        *end* *tell*
>> 
>>        *tell* /application/"Finder"
>> 
>>        *activate*
>> 
>>        *end*
>> 
>> 
>>        Results in this text all before getting to ASCII-MAC and
>>        produces no line feeds
>>        __________
>>        {\rtf1\mac\ansicpg10000\uc1
>>        
>> \deff4\deflang1033\deflangfe1033{\upr{\fonttbl{\f0\fnil\fcharset256\fprq2{\*\panose
>>        00020206030504050203}Times New Roman{\*\falt
>>        Times};}{\f4\fnil\fcharset256\fprq2{\*\panose
>>        00020005000000000000}Times;}
>>        and so on
>>        _________
>> 
>> 
>>        What is the switch I need to get in there that resolves the
>>        raw text to the Tex-Edit processed one ?
>> 
>> 
>>        Thank you if you got this far
>> 
>> 
>>        Kind Regards
>>        Eric
>> 
>> 
>>        On Thursday, August 17, 2023 at 11:59:47 AM UTC+10 Fletcher
>>        Sandbeck wrote:
>> 
>>            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 <[email protected]>
>>>            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 "[email protected]" 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 [email protected].
>>>            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 "[email protected]" 
>> 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 [email protected] 
>> <mailto:[email protected]>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/bbedit/1ac722e0-350d-4532-8ded-053a4aaf4f26n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/bbedit/1ac722e0-350d-4532-8ded-053a4aaf4f26n%40googlegroups.com?utm_medium=email&utm_source=footer>.
> 
> ___________________________________________
> RICK GORDON
> EMERALD VALLEY GRAPHICS AND CONSULTING
> ___________________________________________
> WWW: http://www.shelterpub.com
> 
> -- 
> 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 here. Follow @bbedit on Twitter: 
> <https://twitter.com/bbedit>
> --- You received this message because you are subscribed to a topic in the 
> Google Groups "BBEdit Talk" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/bbedit/hzZWFDppL-8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to 
> [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/bbedit/64DF0B7B.6040008%40rickgordon.com.

-- 
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 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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/976A7194-CF01-4434-93D8-3AEF14D42EAE%40gmail.com.

Reply via email to