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* ResultFile as *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* ResultFile as *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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/6916214d-57b1-4e83-aa5c-458399615673n%40googlegroups.com.

Reply via email to