in

Quark Forums

Need a HELP!!!!

Last post 10-15-2009 6:45 AM by paul.epkumar. 6 replies.
Page 1 of 1 (7 items)
Sort Posts: Previous Next
  • 09-20-2009 5:46 AM

    Need a HELP!!!!

     Dear ALL,

    My name is Dhinakaran and am new to this forum. 

    I need a help to the below requirement to be scripted in applescript

    am using Mac Version : 10.5.2 and 10.5.5
    QuarkXPress : 7.0

    Required:

    • Preference>ColorManager>Source Setup to be set from Legacy to Default QXP 7

                 In quarkxpress, I need to change the source setup to be set from Legacy to default qxp 7 using applescript.

    • Color name Grid Cyan & Infill Magenta to be renamed as GRID_CYAN & INFILL_MAGENTA

                    I need to rename the color name in color pallette from Initial lower case to UPPER CASE using applescript.

    • All GRID_CYAN & INFILL_MAGENTA objects to be kept in separate layers with Trap info set to Overprint.

    Please get back to me if you dont understand.

    Regards,

    Dhinakaran

    Dhinakaran A
    Spi Publishing Private Limited
    India
  • 09-20-2009 1:27 PM In reply to

    Re: Need a HELP!!!!

    Changing the color names seems fairly straightforward. This worked in QXP 6.52, OS X 10.4.11:


    tell application "QuarkXPress"
        tell document 1
            set name of color spec "Grid Cyan" to "GRID_CYAN"
            set name of color spec "Infill Magenta" to "INFILL_MAGENTA"
        end tell
    end tell

    There's a thread elsewhere on the forum that talks about moving elements to their own layer. It's at http://forums.quark.com/p/20628/82976.aspx#8297. Have you seen it? The script selects text boxes based on their width, and moves them to a certain layer. With thanks to the original posters, I was able to adapt the script to work with color names. I just did a couple of quick tests in 6.52, OS X 10.4.11:


    tell application "QuarkXPress"
        tell document 1
            make new layer at beginning with properties {name:"newLayer"}
            set mypage to count of pages
            repeat with a from 1 to mypage
                set mycountbox to count of every generic box of page a
                show page a
                tell page a
                    repeat with b from 1 to mycountbox
                        set myboxcolor to name of color of generic box b
                        --display dialog myboxcolor
                        if myboxcolor is "GRID_CYAN" then
                            move text box b to beginning of layer "newLayer"
                        else if myboxcolor is "INFILL_MAGENTA" then
                            move text box b to beginning of layer "newLayer"
                        end if
                    end repeat
                end tell
            end repeat
        end tell
    end tell

    Note that this script creates a new layer, then moves objects to that layer. If the layer already exists, comment out the line that makes the new layer (putting 2 dashes at the beginning of a line of applescript turns that line into a comment, so it is not acted on), and change the layer name as needed. Also, this script acts on "generic box"--you may need to change that, to text box, or picture box, or whatever.

    I don't have access to QXP 7 right now, but I think the Preference you want to set may be handled as a property. Properties are set pretty easily. This sets the snap distance for the General preference in 6.52:


    tell application "QuarkXPress"
        tell document 1
            set properties to {snap distance:12}
        end tell
    end tell

    Got to run.

  • 09-21-2009 2:05 AM In reply to

    Re: Need a HELP!!!!

    My first reply (which hasn't shown up on the forum yet--it's being moderated) did not include handling the trap information, so here is a combined script that includes the trap. Note that this doesn't handle the Color Manager setting, as I haven't had a chance to look at Quark 7 yet. But that would go where I now have the "snap distance" setting, which is currently commented out. I'm thinking the Color Manager setting would take the form of a Properties setting, but I don't really know for sure. Also, I've only tried this out in QXP 6.52.


    tell application "QuarkXPress"
        tell document 1
            try
                --set properties to {snap distance:12}
                set name of color spec "Grid Cyan" to "GRID_CYAN"
                set name of color spec "Infill Magenta" to "INFILL_MAGENTA"
            end try
            make new layer at beginning with properties {name:"newLayer"}
            set mypage to count of pages
            repeat with a from 1 to mypage
                set mycountbox to count of every generic box of page a
                tell page a
                    repeat with b from 1 to mycountbox
                        set myboxcolor to name of color of generic box b
                        if myboxcolor is "GRID_CYAN" then
                            move generic box b to beginning of layer "newLayer"
                            set properties of generic box b to {background trap:overprint}
                        else if myboxcolor is "INFILL_MAGENTA" then
                            move generic box b to beginning of layer "newLayer"
                            set properties of generic box b to {background trap:overprint}
                        end if
                    end repeat
                end tell
            end repeat
        end tell
    end tell

  • 10-14-2009 10:32 AM In reply to

    Re: Need a HELP!!!!

     

  • 10-14-2009 10:34 AM In reply to

    Re: Need a HELP!!!!

     Hi, I tried using this set of code; but it didn't work for me.

     

  • 10-15-2009 3:52 AM In reply to

    • Emma
    • Top 10 Contributor
    • Joined on 07-07-2004
    • Leeds, UK
    • Posts 1,184

    Re: Need a HELP!!!!

     No one can help you without more information! Did you get an error message? What went wrong exactly?

    If you have applescript experience (or even if you don't) I recommend you troubleshoot the script for yourself a bit - try making mini scripts just containing the bit you want to test. Or insert display dialog messages to tell you where the script has got to, or what the value of variable is.

     Just saying it doesn't work is not enough!

     

    Just for starters, do you have an open Quark doc with colours named exactly the same as the OP? This is a script written to solve a very specific query, and it's unlikely to help anyone else in its current state, although it could of course be adapted to suit other situations.

  • 10-15-2009 6:45 AM In reply to

    Re: Need a HELP!!!!

     Thanks for your response.

    Ok, My requirement in the scripts are as below:

    All text and objects with spot colors named as Grid Cyan & Infill Magenta to be moved to separate layers. These object do not get printed. These are guidelines for the customer to see where the folding marks are and where the text will come things like this will be in these colors. When creating a pdf it is very easy if these are separated from the base artwork, so that operator can close layer's eyes and make a pdf.

    So the script should do the following

    1. Move all the text & images from default layer to layer called "GRID_CYAN" & "INFILL_MAGENTA". This means all the Grid Cyan colors to be moved to a new layer called "GRID_CYAN"  and all the objects with the color name Infill Magenta will be moved to layer "INFILL_MAGENTA".

    2. All these objects and texts trap information to be set to overprint.

    3. Set color manager Pref. to Quark 7 default (If the document is set to legacy)

    and finally

    4. Remove all unused colors

    Thanks

    Edwin 

     

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