Schlagwort-Archive: quarkxpress

AppleScript: make new style spec in quarkxpress

(*
qxp_stylespec_01.applescript

Creates a new text box

Properties are for example. rule above and rule below (position and indent) are not correct scriptable.
*)

tell application "QuarkXPress Passport"
    tell document 1
        if not (exists style spec "10_Hotelname") then
            make new style spec at beginning with properties {class:style spec, base style:null, character attributes:{language:3, font:"TheSans B7 Bold", shade:"60%", size:"12 pt", color:color spec "Schwarz"}, character style:null, key character:"", name:"10_Hotelname", next style:style spec "10_Hotelname", paragraph attributes:{rule above:{rule on:false}, rule below:{rule on:true, text length:Indents, position:"34%", style:solid line, width:"0,5 pt", color:color spec "0/60/100/0"}, left indent:"7 mm", grid lock:false, leading:"16 pt", justification:left justified, relative leading:false}}
        end if
    end tell
end tell

 

AppleScript: make new character spec in quarkxpress

(*
qxp_characterspec_01.applescript

Creates a new text box

Properties are for example.
*)

tell application "QuarkXPress Passport"
    tell document 1
        if not (exists character spec "10_Hotelname") then
            make new character spec at beginning with properties {class:character spec, base style:null, key character:"", language:3, font:"TheSans B7 Bold", name:"10_Hotelname", shade:"60%", size:"12 pt", color:color spec "Schwarz"}
        end if
    end tell
end tell

 

AppleScript: make new color spec in quarkxpress

(*
qxp_colorspec_01.applescript

Creates a new colorspec

Properties are for example. For more details see the dictionary.
*)

tell application "QuarkXPress Passport"
    tell document 1
        if not (exists color spec "0/60/100/0") then
            make new color spec at beginning with properties {class:color spec, color type:CMYK type, angle:"45", CMYK color value:{0, 39321, 65535, 0}, name:"0/60/100/0", separation:true}
        end if
    end tell
end tell

 

AppleScript: make new quarkxpress document with different master spreads

(*
qxp_document_02.applescript

Creates a new document with two pages with different master spread an some rulers
*)

tell application "QuarkXPress Passport"
    --set default document
    set properties of default document 1 to {class:document, auto leading:"20%", automatic trap amount:"0,144 pt", auto constrain:false, auto picture import:auto import off, automatic text box:false, auto kern:true, kern above:"4 pt", baseline grid increment:"8,9 pt", baseline grid start:"11 mm", baseline grid showing:false, ciceros per centimeter:"2,197", facing pages:false, flex space width:"50%", fractional character widths:true, frame inside:true, guides in front:true, horizontal measure:millimeters, hyphenation method:expanded hyphenation, ignore white:true, item spread coords:false, keep master page items:true, knockout limit:"0", ligatures on:standard ligatures, lock guides:false, maintain leading:true, maximum ligature track:"1", overprint limit:"0", page height:"297 mm", points per inch:"72", process trap:true, page width:"210 mm", subscript horizontal scale:"100%", subscript offset:"33%", subscript vertical scale:"100%", single layout mode:false, trapping method:absolute trap, auto page insertion location:end of story, indeterminate trap amount:"0,144 pt", typesetting leading mode:true, vertical measure:millimeters, bottom margin:"8 mm", column count:1, greek below:"7 pt", greek pictures:false, guides showing:true, gutter width:"4,233 mm", inside margin:"8 mm", invisibles showing:true, left margin:"8 mm", outside margin:"8 mm", right margin:"8 mm", rulers showing:true, top margin:"8 mm", view scale increment:"25%", minimum view scale:"10%", maximum view scale:"800%", view scale:"110,3%"}

    -- neues document
    set thedoc to make new document at beginning

    -- reference zu master document
    set theMaster to object reference of master document 1

    -- neue Musterseiten anlegen
    make new spread at end of master document 1 with properties {name:"left"}
    make new spread at end of master document 1 with properties {name:"right"}

    -- reference zu den musterseiten
    set theLeft to a reference to spread "left" of theMaster
    set theRight to a reference to spread "right" of theMaster

    -- set margin rulers und columns der musterseiten
    set properties of page 1 of theLeft to {column count:1, gutter width:"4,233 mm", top margin:"8 mm", left margin:"8 mm", bottom margin:"8 mm", right margin:"8 mm"}
    set properties of page 1 of theRight to {column count:6, gutter width:"2 mm", top margin:"5 mm", left margin:"5 mm", bottom margin:"5 mm", right margin:"5 mm"}

    -- draw rulers to masterpages
    make new horizontal guide at end of page 1 of theLeft with properties {class:horizontal guide, position:"34 mm", scale:"10%"}
    make new horizontal guide at end of page 1 of theLeft with properties {class:horizontal guide, position:"68,626 mm", scale:"10%"}
    make new horizontal guide at end of page 1 of theLeft with properties {class:horizontal guide, position:"49,509 mm", scale:"10%"}
    make new horizontal guide at end of page 1 of theLeft with properties {class:horizontal guide, position:"78 mm", scale:"10%"}
    make new vertical guide at end of page 1 of theLeft with properties {class:vertical guide, position:"29,566 mm", scale:"10%"}
    make new vertical guide at end of page 1 of theLeft with properties {class:vertical guide, position:"68,957 mm", scale:"10%"}
    make new vertical guide at end of page 1 of theLeft with properties {class:vertical guide, position:"89,232 mm", scale:"10%"}
    make new vertical guide at end of page 1 of theLeft with properties {class:vertical guide, position:"48,683 mm", scale:"10%"}

    make new horizontal guide at end of page 1 of theRight with properties {class:horizontal guide, position:"2,626 mm", scale:"10%"}
    make new horizontal guide at end of page 1 of theRight with properties {class:horizontal guide, position:"36 mm", scale:"10%"}
    make new vertical guide at end of page 1 of theRight with properties {class:vertical guide, position:"13,327 mm", scale:"10%"}
    make new vertical guide at end of page 1 of theRight with properties {class:vertical guide, position:"84 mm", scale:"10%"}
    make new vertical guide at end of page 1 of theRight with properties {class:vertical guide, position:"126 mm", scale:"10%"}
    make new vertical guide at end of page 1 of theRight with properties {class:vertical guide, position:"184,228 mm", scale:"10%"}
    make new vertical guide at end of page 1 of theRight with properties {class:vertical guide, position:"186,737 mm", scale:"10%"}
    make new vertical guide at end of page 1 of theRight with properties {class:vertical guide, position:"189,559 mm", scale:"10%"}

    -- musterseiten zuweisen
    tell thedoc
        set master spread of page 1 to theLeft
        make new page at end of spread 1 with properties {master spread:theRight}
    end tell
end tell

 

AppleScript: make new quarkxpress document

(*
qxp_document_01.applescript

Creates a new document

All properties below are NOT needed to create a new document.
It is possible to use only specific properties, the other properties
will be set to default values.
*)

tell application "QuarkXPress Passport"
    set properties of default document 1 to {class:document, auto leading:"20%", automatic trap amount:"0,144 pt", auto constrain:false, auto picture import:auto import off, automatic text box:false, auto kern:true, kern above:"4 pt", baseline grid increment:"11 pt", baseline grid start:"4 mm", baseline grid showing:false, ciceros per centimeter:"2,197", facing pages:false, flex space width:"50%", fractional character widths:true, frame inside:true, guides in front:true, horizontal measure:millimeters, hyphenation method:expanded hyphenation, ignore white:true, item spread coords:false, keep master page items:true, knockout limit:"0", ligatures on:standard ligatures, lock guides:false, maintain leading:true, maximum ligature track:"1", overprint limit:"0", page height:"297 mm", points per inch:"72", process trap:true, page width:"420 mm", subscript horizontal scale:"100%", subscript offset:"33%", subscript vertical scale:"100%", single layout mode:false, trapping method:absolute trap, auto page insertion location:end of story, indeterminate trap amount:"0,144 pt", typesetting leading mode:true, vertical measure:millimeters, bottom margin:"8 mm", column count:1, greek below:"7 pt", greek pictures:false, guides showing:true, gutter width:"4,233 mm", inside margin:"8 mm", invisibles showing:true, left margin:"8 mm", outside margin:"8 mm", right margin:"8 mm", rulers showing:true, top margin:"8 mm", view scale increment:"25%", minimum view scale:"10%", maximum view scale:"800%", view scale:"86,3%"}
    make new document at beginning
end tell