Re: ()"#%&/=!!! QuarkXpress
Re: ()"#%&/=!!! QuarkXpress
- Subject: Re: ()"#%&/=!!! QuarkXpress
- From: Hans Haesler <email@hidden>
- Date: Sun, 19 Nov 2000 11:04:13 +0100
On Sat, 18 Nov 2000, I wrote:
>
The list covers the characters from ASCII 1 through 255.
Sorry... this should be "... from ASCII 0 through 255."
The constant for every character can be get by using the ASCII number.
Even for ASCII zero, although an item 0 is impossible (XPress adds 1
to make it work):
---
tell application "QuarkXPress 4.11"
delimit item 0 of delimit table 1
end tell
-->not word member
As I said before, it's not a good idea to fiddle with the items of the
delimit table. You must have a good reason for doing it. Okay, the table
is restored to the defaults when you restart XPress, but you should save
the list of the constants und restore the table at the end of the script.
Below an example for your three-paragraph text box. The script saves
the list, sets every item to 'can start or end or be contained in word',
loops through the items 0 to 32 to reset them to 'not word member',
gets the contents of paragraph 1, restores the delimit table and
displays a dialog.
While you can set every item of the table to one constant in one sweep,
you must loop through them to restore the values.
---
tell application "QuarkXPress 4.11"
set oD to delimit items of delimit table 1
set delimit items of delimit table 1 to can start or end or be contained in word
repeat with i from 0 to 32
set delimit item i of delimit table 1 to not word member
end repeat
tell document 1
tell current box
set paraOne to paragraph 1
end tell
end tell
repeat with i from 1 to 256
set delimit item (i - 1) of delimit table 1 to item i of oD
end repeat
display dialog paraOne
end tell
-->"()\"#%&/=!!!"
The timings (one run, no average): from Script Editor = 2100 ticks,
from OSA Menu = 72 ticks.
Hans
---
Hans Haesler | email@hidden