in

Quark Forums

Placeholders/Cut Paste on QuarkXPress 7 Passport

Last post 11-19-2009 2:23 AM by dcbradle. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 11-19-2009 2:23 AM

    • dcbradle
    • Not Ranked
    • Joined on 02-26-2007
    • Sheffield
    • Posts 2

    Placeholders/Cut Paste on QuarkXPress 7 Passport

    I have upgraded from QuarkXPress 6 to QuarkXPress 7 Passport.

    I am now running an Applescript that I created to run on Quark 6, I'm now testing it in Quark 6. Most of my script runs fine, however I'm having problems with  a cut and paste/placeholder section.

    Part of my script creates a picture box, assign a background colour to it, then creates a text box on top and places a number in the centre. The script then selects and groups these boxes, cuts the group, and where the script has placed a placeholder in another text box, pastes the group.

    He's the part of the code that creates the placeholder, creates the boxes, groups them, cuts them and pastes in Quark 6:

    set Placeholder to "$$_1_$$"
    make new text at end of text box ("Products Description") with properties {contents:Placeholder, size:6.5, font:"Helvetica Light", color:"Yellow"}

    make picture box at beginning with properties {name:{"Cat Item Frame " & strCatItem}}
    tell picture box ("Cat Item Frame " & strCatItem)
        set bounds to {100, 100, 104, 105.06}
        set runaround to none runaround
        set color to "Wetside Blue 09-10"
        set width of frame to 0.75
        set color of frame to "Wetside Blue 09-10"
        set corner radius to 0.5
        set selected to true
    end tell


    make new text box at beginning with properties {name:{"Cat Item " & strCatItem}}
    tell text box ("Cat Item " & strCatItem)
        set bounds to {101.03, 100, 103.75, 105.06}
        set runaround to none runaround
        set vertical justification to top justified
        set justification of paragraph 1 to centered
        set selected to true
    end tell
    make new text at end of text box ("Cat Item " & strCatItem) with properties {contents:strCatItem, size:7.5, font:"Stymie Bd BT", color:"White"}

    set grouped of group box 1 to true
    set selected of group box 1 to true

    cut
    select (every text of text box ("Products Description") whose contents is Placeholder)
    paste
    set selected of group box 1 to false
    set selected of text box ("Products Description") to false


    Then in Quark 7:

    set Placeholder to "$$_1_$$"
    make new text at end of text box ("Products Description") with properties {contents:«class Plch», size:6.5, font:"Helvetica Light", color:"Yellow"}

    make picture box at beginning with properties {name:{"Cat Item Frame " & strCatItem}}
    tell picture box ("Cat Item Frame " & strCatItem)
        set bounds to {100, 100, 104, 105.06}
        set runaround to none runaround
        set color to "Wetside Blue 09-10"
        set width of frame to 0.75
        set color of frame to "Wetside Blue 09-10"
        set corner radius to 0.5
        set selected to true
    end tell


    make new text box at beginning with properties {name:{"Cat Item " & strCatItem}}
        tell text box ("Cat Item " & strCatItem)
        set bounds to {101.03, 100, 103.75, 105.06}
        set runaround to none runaround
        set vertical justification to top justified
        set justification of paragraph 1 to centered
        set selected to true
    end tell
    make new text at end of text box ("Cat Item " & strCatItem) with properties {contents:strCatItem, size:7.5, font:"Stymie Bd BT", color:"White"}

    set grouped of group box 1 to true
    set selected of group box 1 to true
    cut
    select (every text of text box ("Products Description") whose contents is «class Plch»)
    paste
    set selected of group box 1 to false
    set selected of text box ("Products Description") to false

    I don't mind if someone gives me another way of scripting this process as opposed to giving me the updated version of using Placeholders in Quark 7.

    All I need to achieve is getting the grouped picture and text box into another textbox.

    Also to point out I do do this several times on one page.

    David Bradley
Page 1 of 1 (1 items)
Powered by Community Server (Commercial Edition), by Telligent Systems