I have been searching for the solution on applying rule above or below, but till now got no luck.
I tried both paragraph properties and paragraph attributes that recommended but none of them work.
Could someone advise me please.
Thanks!
This should get you started…
tell application "QuarkXPress"
tell current page of layout space 1 of project 1
tell paragraph 1 of text box 1
set properties to {rule below:{rule on:true, color:"black", width:"2 pt", style:solid line, text length:Indents, left indent:"0p", right indent:"0p", position:"4 pt"}}
end tell
end tell
end tell
It took a little experimenting but I got it:
tell application "QuarkXPress"
if not (exists document 1) then
try
display dialog "No document open!" buttons "Cancel" default button "Cancel"
on error
return
end try
end if
set FileNameForTag to (name of front document) as string
tell front document
set TempValue to page rule origin
set page rule origin to {0, 0}
tell page 1
make new text box at beginning with properties {bounds:{"0.25\"", "0.5\"", "1\"", "8\""}, color:null, runaround:none runaround, name:"FileName"}
set properties of rule below of first paragraph of story 1 of text box "FileName" to {rule on:true, color:"Black", shade:100, style:solid line, text length:true, width:6}
set story 1 of text box "FileName" to FileNameForTag & return
set properties of (story 1 of text box "FileName") to {font:"Helvetica CondensedBlack", size:"18 pt", color:"Black", leading:"18 pt"}
set justification of story 1 of text box "FileName" to left justified
end tell
set page rule origin to TempValue
end tell
end tell
Thank you both of you, TecNik & Matt-Boy!
I understand the syntax now.