Publi-Script Forums

Applescript / Javascript => Adobe Illustrator scripting => Topic started by: Star123 on April 19, 2015, 09:19:01 AM

Title: Applescript to round off the shade % of graphic in Illustrator.
Post by: Star123 on April 19, 2015, 09:19:01 AM
Hi Guys,

 I am using MacIntosh X, Adobe Illustrator CS6 (version 16) and Applescript Editor (version 2.5).

I have more than 200 files with Bar charts and Pie charts. Every Time I have to convert the color mode to GrayScale through Menu Bar. (Edit > Edit colors > Convert to GrayScale). After doing that I have to select each and every bar of the chart with Direct selection tool and to round of the Shade Percentage.

For example
70.40% to 70% (the value after the dot is below 50)
70.60 to 71% (the value after the dot is above 50)

Is there a way, to do this using applescript?
It will saves me a day.

Thanks in advance.
Title: Re: Applescript to round off the shade % of graphic in Illustrator.
Post by: Jean-Marie Schwartz on May 04, 2015, 04:20:53 AM
Hi! Sorry to answer so late. I was focused on the Illy thing. Rounding numbers can be done this way:

Code: [Select]
set a to 74.5
set b to round a rounding as taught in school

HTH.