Re: Quark:setting type of tab
Re: Quark:setting type of tab
- Subject: Re: Quark:setting type of tab
- From: Hans Haesler <email@hidden>
- Date: Tue, 1 May 2001 11:59:52 +0200
On Tue, 01 May 2001, Olivier wrote:
>
this version of my script don't work :
>
>
set type_of_tab to "right justified"
>
set value_of_tab to 50
>
>
tell application "QuarkXPress Passport 4.11"
>
tell document 1
>
>
set list_of_tab to {{justification:{type_of_tab}} &
>
{position:{value_of_tab}}}
>
tell paragraph 1 of current box -- a text box has been selected
>
before
>
set properties to {tab list:list_of_tab}
>
end tell
>
end tell
>
end tell
[snip]
>
What is wrong with my type_of_tab ? Has it something to do with me and
>
Quark, or with me and Applescript ?
With all of them ;-)
'right justified' is a constant, but you are using quotes (= ") as if it
were a string. If you want to use it as string then you must say:
---
set type_of_tab to "rght"
---
If you want to use the constant then you must move it _inside_ the Quark
tell block, where it is known:
---
tell document 1 of application "QuarkXPress 4.11"
set type_of_tab to right justified
--and so on
---
Curiously, used as constant -- and placed outside of the tell block --
this form works, too:
---
set type_of_tab to right
---
BTW, there are too many {braces}. 'Type' and 'value' don't need them:
---
set type_of_tab to "rght"
set value_of_tab to 50
tell document 1 of application "QuarkXPress 4.11"
set list_of_tab to {{justification:type_of_tab} & {position:value_of_tab}}
tell paragraph 1 of current box
set tab list to list_of_tab
end tell
end tell
---
Regards,
Hans
---
Hans Haesler | email@hidden