Skip to main content
Inspiring
December 8, 2019
Answered

Scale selection

  • December 8, 2019
  • 3 replies
  • 801 views

hi,

I have in my document many prices. Somethimes i need some of them rescale to 80% BUT:

Indesign preferences have 2 options. 

Apply To Content or Adjust Scaling Percentage. I have to use Percentage. It is posible via script?

Now i have to change preferences everytime when i need this and then change this back 😞 so my worflow is:

I have 5 prices wich i want to rescale. 

I will select one price go to  /preferences select Scaling Percentage and set size to 80%. Then i select the rest 4 prices and Transform Again Individually because i need my group of  selected prices on the same position.

My dream idea is:

I will select 5 prices, run this awesome script and i get 5 prices scale to 80% and they stay in their position depents on reference point of course 🙂 

Many many maaaany thanks.

This topic has been closed for replies.
Correct answer zuzu_kuc1

Well I did an Internet survey and write my little JS script. It might be useful

 

  var mujVyber = app.selection;
        app.transformPreferences.whenScaling = WhenScalingOptions.ADJUST_SCALING_PERCENTAGE;

 for (i = 0; i < mujVyber.length; i++) 
        { 
   var myMatrix = app.transformationMatrices.add();

   myMatrix = myMatrix.scaleMatrix (0.8,0.8);
   mujVyber[i].transform(CoordinateSpaces.INNER_COORDINATES, AnchorPoint.BOTTOM_RIGHT_ANCHOR, myMatrix);
        }
   
       app.transformPreferences.whenScaling = WhenScalingOptions.APPLY_TO_CONTENT;

 



3 replies

Community Expert
December 9, 2019

Why not just create a Character Style with it's horizontal and vertical scale set to 80% (Advanced Character Formats) and apply this to the prices? You could speed things up by using a GREP Style.

Or am I missing something? Can you post a screeshot(s) of what you're after?

zuzu_kuc1Author
Inspiring
December 9, 2019

A cant use just Character styles, because somethimes my prices are not just a text but group of links and text frames.
(video above) If i create Character style to 80% text, my links stay at 100%  and text it too small 

zuzu_kuc1AuthorCorrect answer
Inspiring
December 14, 2019

Well I did an Internet survey and write my little JS script. It might be useful

 

  var mujVyber = app.selection;
        app.transformPreferences.whenScaling = WhenScalingOptions.ADJUST_SCALING_PERCENTAGE;

 for (i = 0; i < mujVyber.length; i++) 
        { 
   var myMatrix = app.transformationMatrices.add();

   myMatrix = myMatrix.scaleMatrix (0.8,0.8);
   mujVyber[i].transform(CoordinateSpaces.INNER_COORDINATES, AnchorPoint.BOTTOM_RIGHT_ANCHOR, myMatrix);
        }
   
       app.transformPreferences.whenScaling = WhenScalingOptions.APPLY_TO_CONTENT;

 



Derek Cross
Community Expert
Community Expert
December 8, 2019

I'm not sure what you want but if it's two sets of prices – say one in Dollars and one in Pounds, you can use the Conditional Text feature:

Windows > Type and Tables > Conditional Text 

You can output one set of prices and then output the other set which, unlike layers, reflow. You can also have one set in another font and/or color as illustrated in this mock-up below.

The first pic shows the dialogue box, the second the twom sets of prices (you can have more than two), the third pic shows the  £price output and the fourth the $price output – I've colored the second set for fun!

zuzu_kuc1Author
Inspiring
December 9, 2019

Video will be better fot the explanation
https://youtu.be/EjLScVjb0mI
And dream idea is ..select few object, hit shortcut for the script and all selection will scale to 80%
without changing preferences to percentage option and without using Transform Again command.

brian_p_dts
Community Expert
Community Expert
December 8, 2019

I'm having a hard time picturing how you want their position to stay the same. Can you post some before after screenshots? Are you talking about horizontal scaling of the text or the frame? In the second case below, do you want $5.00 to remain even with the original on the bottom Y axis? If so, you could just move the $5 back and use Align to space all the frames appropriately?