color killer/conversion script

Rick Gaskin rgaskin at wdt.net
Tue Nov 13 12:14:35 CST 2007


Hi Steve i will take a look at and see how it goes. But you are correct 
there is no need for these multiple blues and reds with they are all 
exactly the same. The program just sees them as new colors when in fact 
the are the same name and color breakdown.

Why this has become "issue" is that I handle a large account that 
useonly red white and blue in their ads. Well, they have decided that 
they would like to add an additional color (blue) and long story short 
....the addition of this particular color has the press saturating one 
of the inks..which turns a normally navy blue into a purple (in print) 
so I have to compensate (by tweaking the default blue). Consequently, 
when ever I move (cut, copy paste) and element containing my new default 
navy it creates a new blue.

I glad to hear it will be this issue will be addressed in the next major 
realease - but I don't make up the software budgets - so, i don't know 
when we would be buyingthe next release

Until then I will have to come up with some script fixes. Thanks again I 
will give it a try - R

Steve Mills wrote:
> On Nov 13, 2007, at 10:08:55, Rick Gaskin wrote:
>
>> i still plagued by extra colors being added to my color lsit every 
>> time i bring in colorized element (text, geo blocks etc etc) from 
>> another doc.
>>
>> so, i got to thinkin (i have no idea how this script could be written 
>> but it shouldn't be hard - i have something similar written by our 
>> friend SM which kind of sort of does the sme thing with hidden glyphs 
>> - ie searches out text blocks and if a certain condition  exists or a 
>> certain anamoly is found ...it will fix the text)
>>
>> why couldn't script be written that would look at every element in 
>> the doc. when it encountered a element with a particular color it 
>> would automatical convert it to the correct color...
>>
>> in other words, upon activation the script looks at every element, 
>> when it finds an element and the color with anamolous color (ex: Blue 
>> 1, Blue 2, etc or Red 1, Red 2 etc  - essentially any color name 
>> followed by a space and numeral) that it would convert it to another 
>> color from the color list - create peset set conversion  Blue 1 = 
>> Blue; Blue 2 = Blue;
>>
>> the script could go further and delete the rogue color after its been 
>> converted
>>
>> he example below doesn't work and i am sure there in reality it would 
>> be more complex but  blue 1 make it blue
>
> As long as you're OK with the script having hard-coded color names in 
> it, and you're OK knowing that no matter where the color came from, it 
> will be replaced (what if somebody really wanted 2 different Blues of 
> slightly different tints and named them Blue and Blue 1?).
>
> To make sure you get every element at every level on every spread, you 
> need to use 3 main loops; one for doc spreads, one for master spreads, 
> and one for text flows. The doc spreads and master spreads can be 
> handled in the same way, so use a function to handle both lists 
> instead of writing it twice. For flows, you need to check each 
> character run AND all elements inside each embedded spread (named 
> "embedded group" in AppleScript terminology).
>
> To make it somewhat easier, spreads have a "full contents" and "full 
> embedded contents" properties. The latter includes elements in 
> embedded spreads in flows, which makes your text flow loop easier. 
> Both of these return a flat list of all elements however deeply 
> contained they are. Here's the basic loop for elements:
>
> set elems to full embedded contents of spread 1 of document 1
> set num to number of items of elems
>
> repeat with i from 1 to num
>     set e to item i of elems
>     
>     if fill color of e is "Blue 1" then
>         say "yup"
>     end if
> end repeat
>
> The line that says "yup" is where you'd do the color replacement. 
> You'll also need a bunch more logical expressions in the "if" to 
> handle all possible color names. Put that into a function and call the 
> function once for every spread and once for every master spread. Then 
> you'll need a slightly different loop for text flows.
>
> If you aren't able to write the script, let me know and I'll see if I 
> can find some time to help out more. And keep in mind that the next 
> major release of Creator will have a feature that will make finding 
> and replacing this sort of thing a snap. You'll have to weigh the time 
> spent writing the script against the time you'll have to wait for that 
> feature and decide if the script is worth it.
>
> _________________________________________________________
> Steve Mills                              Me: 952-401-6255
> Senior Software Architect                         MultiAd
> smills at multiad.com                       www.multi-ad.com
>
>
> _______________________________________________
> Creator mailing list
> Creator at wacondatrader.com
> http://wacondatrader.com/mailman/listinfo/creator
>
> To officially report a bug in Creator, go here:
> http://www.creatorsoftware.com/support/contact_us/report_a_problem/
>
> Searchable Archive: http://feick.webhop.net/lists/html/creatorlist/
>
> Multi-Ad's Creator website can be found at:
> http://www.creatorsoftware.com
>
>

-- 
CONFIDENTIALITY NOTICE: This message may be legally privileged and/or confidential and is intended only for the use of the addressee(s). No addressee should forward, print, copy, or otherwise reproduce this message in any manner that would allow it to be viewed by any individual not originally listed as a recipient. If the reader of this message is not the intended recipient, you are hereby notified that any unauthorized disclosure, dissemination, distribution, copying or the taking of any action in reliance on the information herein is strictly prohibited. If you have received this communication in error, please immediately notify the sender and delete this message. Thank you.



More information about the Creator mailing list