Hi
I’m forced to do something in QXP 4.11 (and hence OS9)
I can make a new style spec and give it properties except for the tab list
I have tried variations on:
make new style spec at end with properties {name:"CommentStyle", next style:style spec "CommentStyle", character style:character spec "CommentText", paragraph attributes: {left indent:"1.611"", first indent:"-1.611"", tab list:{{justification:left, fill character:" ", position:"1.648""}}}}
and it does everything but the tabs.
Anyone have any brilliant insights into what it is that I’ve missed?
I have had the same problem. You must first set the tab list to a variable. This will give you a list of records. Each item of the list is a record for each tab in the paragraph. I am on a PC at home so I am going on memory here but I think it is something like this. Lets assume you have two tab settings in the paragraph. We are going to change the settings of the first tab and add a new, third tab.
set tab_list to tab list --get the tab list
set position of item 1 of tab_list to “92.05 mm” – change position of 1st tab
set justification of item 1 of tab_list to centered – change justification
set new_tab to {justification:right justified, fill character:" ", position:“105 mm”
copy new_tab to end of tab_list – add new tab to end of list
set tab list to tab_list – set the tab list
I know I don’t have all the tell blocks but I don’t have a lot of time right now. This technique worked last week flawlessly.
I tried the variable thing when I tried to create the new style sheet the first time. It appears the tab list is a read-only property within the style sheet.
Interestingly, if I physically set the Normal style sheet to have a left tab at 1.648", then create the style sheet with this code:
tell application "QuarkXPress™"
tell document 1
set x to make new style spec at end with properties {name:"CommentStyle", paragraph attributes:{left indent:"1.611"", first indent:"-1.611"", tab list:{{justification:left justified, fill character:" ", position:"2""}}}}
make character spec at end with properties {name:"CommentStyleChar", «class CATR»:{color:"Black", font:"Monaco"}}
set character style of x to character spec "CommentStyleChar"
end tell
end tell
I get a style sheet with the tab at 1.648" instead of 2". Weird. At this point, I can retrieve the tab list of the style sheet and see the parameters but I can’t retroactively change them.
:oops: There’s got to a solution, you would think…
Thanks for the replies
I tried Grspur’s method and it does get a tab into the style, but for me it just put the
position to the same value as Normal and didn’t change it.
I wonder if Drossi had tabs in his Normal.
Drossi I’d really like to see some code for this.