Re: QuarkXPress text export (save) limited to 7 characters
Re: QuarkXPress text export (save) limited to 7 characters
- Subject: Re: QuarkXPress text export (save) limited to 7 characters
- From: Hans Haesler <email@hidden>
- Date: Thu, 15 Mar 2001 19:19:49 +0100
On Thu, 15 Mar 2001, Michael Turner wrote:
>
(...) Does "save" support export other than XTags?
>
What is the syntax for save as ASCII text?
Okay. This is a little bit complicated. Let's see if I can get it right.
Some people complained that they couldn't save their text as ASCII files
when the XPress Tags filter was loaded. But they just didn't knew that
they could set a variable to the contents of the text box and write this
to a file (well... using 'save' would be more convenient).
So Quark gave in. They changed this for QXP 4.1 and now you must make sure
that the check box "Include Style Sheets" (in the dialog "Get Text", i.e.
'File / Get Text...') is enabled or disabled, depending on what you need.
You can do this by script with the commands ...
---
set import styles to true --to check the box
---
...and
---
set import styles to false --to disable the box
---
This is from a forwarded message from Scripting Support,
dated "Fri, 14 Jan 2000" (no typo, this was more than a year ago):
>
There was a change made in 4.1. You can now only save as XTags if you
>
set Import Styles to true. This is because users wanted to be able
>
to save as ASCII even if the XPress Tags Filter XTenson was loaded.
>
>
So, try this:
>
>
Import styles false = ASCII
>
Import styles true = XTag
>
>
XTAGS:
>
tell app "QuarkXPress"
>
set import styles to true
>
tell document 1
>
save story 1 in "..." as "TEXT"
>
end
>
end
>
>
ASCII
>
tell app "QuarkXPress"
>
set import styles to false
>
tell document 1
>
save story 1 in "..." as "TEXT"
>
end
>
end
This was well-meant by the Quark techs and it... works, too ;-).
BUT, the truth is: if you want ASCII files then you don't need to care
about the check box. Condition is that you don't use 'as "TEXT"':
---
set fileName to (path to startup disk as string) & "test"
tell document 1 of application "QuarkXPress 4.11"
save story 1 of current box in (fileName & ".txt")
end tell
---
The result is an ASCII file, regardless of the status of the check box.
If you need tagged files, then you must make sure that the box is
enabled (by script) and you must use 'as "TEXT"':
---
set fileName to (path to startup disk as string) & "test"
tell application "QuarkXPress 4.11"
set import styles to true
tell document 1
save story 1 of current box in (fileName & ".xtg") as "TEXT"
end tell
end tell
---
>
-- I hate these dictionaries. They tell you just enough to want to throw
>
them though a window.
<g> Very well put. How right you are!
Regards,
Hans
---
Hans Haesler | email@hidden