in

Quark Forums

Proportional picture scaling?

Last post 10-07-2005 4:05 PM by larsen67. 15 replies.
Page 1 of 2 (16 items) 1 2 Next >
Sort Posts: Previous Next
  • 09-29-2005 6:04 PM

    Proportional picture scaling?

    Hi,

    XPert Scale from ALAP might be your solution. Download the PDFmanual from ALAP's site and see it it works.
  • 09-30-2005 7:40 AM In reply to

    Proportional picture scaling?

    I think a script would do it easily. Quark is a scriptable application but we users do not take all the benefits of it. I myself could not really help you in this way but you should post to the Scripting forum.
    Also the AppleScript Editor allows to record actions. Never tried but you should give it a go.
    Hope this helps!
    Jean-Marie Schwartz

    > Mac Pro Quad Core Intel 2.8 GHz, OS X.6.8, Quark XPress 9.2, Adobe CS5 <
  • 09-30-2005 11:42 AM In reply to

    • jonesy17
    • Top 25 Contributor
    • Joined on 08-11-2004
    • Toronto, ON Canada
    • Posts 907

    Proportional picture scaling?

    Jean-Marie Schwartz:
    Also the AppleScript Editor allows to record actions. Never tried but you should give it a go.


    Script Editor will only record the actions of a recordable application: Quark isn't one of them. Sad

    However, there is an XTension available that makes QuarkXPress a recordable application.

    Robert
  • 09-30-2005 1:10 PM In reply to

    Proportional picture scaling?

    I've wanted this feature from quark for a long time now. Hell I'll even hold another key down. I also have the XPert Scale which won't do this either. I have been trying with applescript to achieve this so I can add to my own quick keys but to no avail. If someone out there has already done this make my day. All other properties can remain untouched and the images are not distorted same X & Y. I don't understand how to get the numbers out of this: {"150%", "150%"}
  • 09-30-2005 1:49 PM In reply to

    Proportional picture scaling?

    I doubt that very much but you can keep suggesting it here:
    http://www.quark.com/products/xpress/wishlist.cfm
    Along with my lower than 10% images.
  • 09-30-2005 2:03 PM In reply to

    Proportional picture scaling?

    I hope you don't mind my jumping in but here is a script that will do what you want... and a little more.
    [quote user=red:80501e4512]tell[/color:80501e4512] application "QuarkXPress Passport"
         try
              set docName to name of document 1
              tell document docName
                   try
                        set CurBox to object reference of current box
                        if box type of CurBox is not picture box type then error
                        set doLoop to true
                        repeat while doLoop
                             set DPercent to display dialog "Please enter the desired scale percentage for this image" buttons {"Cancel", "Of current values", "of originale size"} default answer "100" with icon note
                             if text returned of DPercent is not "" then
                                  try
                                       set ThePercent to (text returned of DPercent) as real
                                       if button returned of DPercent is "Of current values" then
                                            copy (coerce ((scale of image 1 of CurBox) as percent point) to list) to {VertPercent, HorPercent}
                                            set VertPercent to VertPercent as real
                                            set HorPercent to HorPercent as real
                                            set VertPercent to VertPercent * ThePercent / 100
                                            set HorPercent to HorPercent * ThePercent / 100
                                       else
                                            set VertPercent to ThePercent
                                            set HorPercent to ThePercent
                                       end if
                                       set doLoop to false
                                  on error
                                       beep
                                       display dialog "Numbers only only please!" with icon caution
                                  end try
                             end if
                        end repeat
                        try
                             set scale of image 1 of CurBox to {VertPercent, HorPercent}
                        end try
                   on error
                        beep
                        display dialog "You have to select a single picture box for this script to work!" with icon stop
                   end try
              end tell
         on error
              beep
              display dialog "Sorry, you do not have an opened document that I can work on!" with icon stop
         end try
    end tell

    Hope this helps

    Michel Lemieux
    Click here --> to visit my PUBLISHING & SCRIPTING FORUM

  • 09-30-2005 2:26 PM In reply to

    Proportional picture scaling?

    Wow that was fast michel thanks for that, I get an unknown token on this line of the code:
    if text returned of DPercent != "" then
    I have had this once before is this something that gets mixed up when pasting on the net? I don't understand what the exclamation mark is for or should be?
    A much more elegant script than I was trying to compile.
  • 09-30-2005 2:37 PM In reply to

    Proportional picture scaling?

    larsen67:
    Wow that was fast michel thanks for that, I get an unknown token on this line of the code:
    if text returned of DPercent != "" then
    I have had this once before is this something that gets mixed up when pasting on the net? I don't understand what the exclamation mark is for or should be?
    A much more elegant script than I was trying to compile.


    Yeah, I guess I let that one slip...

    != should be the unequal sign (option + "=") in any case, I will revised my posted script so that later copies will run more smoothly!

    Thanks for the heads up!

    Michel Lemieux
    Click here --> to visit my PUBLISHING & SCRIPTING FORUM

  • 09-30-2005 2:49 PM In reply to

    Proportional picture scaling?

    Thanks michel, now i Know what this should be will help fix another script that i had a the same problem with.
  • 10-03-2005 7:39 AM In reply to

    Proportional picture scaling?

    "Classieux" as I would say in French! Merci Michel!
    As to enhance it how to have the Adapt box to pic integrated?
    (We should toggle to Script Forum, shouldn't we?)
    Jean-Marie Schwartz

    > Mac Pro Quad Core Intel 2.8 GHz, OS X.6.8, Quark XPress 9.2, Adobe CS5 <
  • 10-03-2005 10:17 AM In reply to

    Proportional picture scaling?

    Michel, another fine script but this actually does too much. What i was trying to achieve was a script that i could set to a keyboard short cut with no need to set anything. Is there a way that i can get a script to read the current scale property of a picture and then increase by 1% so far i have been unable to work out how to get this property returned as a number. I was hoping that your script would shed some light on where i was going wrong but i can't work this out. Many thanks.
  • 10-03-2005 12:53 PM In reply to

    Proportional picture scaling?

    larsen67:
    Michel, another fine script but this actually does too much. What i was trying to achieve was a script that i could set to a keyboard short cut with no need to set anything. Is there a way that i can get a script to read the current scale property of a picture and then increase by 1% so far i have been unable to work out how to get this property returned as a number. I was hoping that your script would shed some light on where i was going wrong but i can't work this out. Many thanks.


    Actually, it does. Here' are the lines that sg=hould help you in yours:

    copy (coerce ((scale of image 1 of CurBox) as percent point) to list) to {VertPercent, HorPercent}
    set VertPercent to VertPercent as real
    set HorPercent to HorPercent as real

    This will return the percentages as real numbers which could then be applied to any mathematical expression.

    You should also know that you do not need to conevrt those values back to perent point prior to reapply them to the image, Quark will convert the values "on the fly" if it can.

    Hope this helps!

    Michel Lemieux
    Click here --> to visit my PUBLISHING & SCRIPTING FORUM

  • 10-03-2005 1:43 PM In reply to

    Proportional picture scaling?

    Ace, i thought i had this cracked on friday when i saw your script with "copy coerce" and im sure i tried the same as what you've stated here. Could i get it to work friday not a chance, today it works prefect. Thank you very much i've wanted this for ages its now on my quick keys and runs plenty fast enough. Is there an easy way to set offset attributes so that it re-centres the image?

    tell application "QuarkXPress"
    set CurBox to object reference of current box
    copy (coerce ((scale of image 1 of CurBox) as percent point) to list) to {VertPercent, HorPercent}
    set VertPercent to VertPercent as real
    set HorPercent to HorPercent as real
    set scale of image 1 of CurBox to {VertPercent + 1, HorPercent + 1}
    end tell

    tell application "QuarkXPress"
    set CurBox to object reference of current box
    copy (coerce ((scale of image 1 of CurBox) as percent point) to list) to {VertPercent, HorPercent}
    set VertPercent to VertPercent as real
    set HorPercent to HorPercent as real
    set scale of image 1 of CurBox to {VertPercent - 1, HorPercent - 1}
    end tell
  • 10-03-2005 1:50 PM In reply to

    Proportional picture scaling?

    larsen67:
    ...
    Is there an easy way to set offset attributes so that it re-centres the image?


    The quickest way:

    set bounds of image 1 of CurBox to centered

    Hope this helps!

    Michel Lemieux
    Click here --> to visit my PUBLISHING & SCRIPTING FORUM

  • 10-03-2005 2:00 PM In reply to

    Proportional picture scaling?

    your a star, i'll have to buy a book on scripting now
Page 1 of 2 (16 items) 1 2 Next >
Powered by Community Server (Commercial Edition), by Telligent Systems