9 Replies Latest reply: Jun 15, 2010 6:16 AM by artchrome RSS

    Who's able to change color of this ?

    artchrome Community Member

      Hi all,

       

      I'm unable to change color of each element of this Illustrator file (there are CS,CS3 or CS4 file.. choice it yours) by scripting (of course)

       

      Who will be able to change it ?

       

      Many thanks !!

       

      art.chrome

        • 1. Re: Who's able to change color of this ?
          chris gebab Community Member

          Hi Chrome,

           

          you must change the appearance, no chance (?) (cs3).

          except you move it outside the group (with the appearance)

          so the group will be deleted.

          something like that(where ad is document):

           

          var obj= ad.groupItems[0](stroke=blue).compoundPathItems[0](stroke=no)
          var lay = ad.layers[0];
          obj.move(lay,ElementPlacement.INSIDE)

           

          but, how to know if there is a appearance, and

          how to get the color ?

          once more i know why i hate this appearance thing

           

          helps this? or is it not what you want to hear?

          Chris

          • 2. Re: Who's able to change color of this ?
            Muppet Mark-QAl63s Community Member

            I have been stuck with this before now and as far as I see you have NO access via script to 'appearance' nor do they give you a bail out option where it can be detected and you close… This is very bad IMO… I see nothing new added to the CS5 Trial that deals with this either but I've only been playing for a day or two…

            • 3. Re: Who's able to change color of this ?
              artchrome Community Member

              Hi Chris & Muppet Mark,

               

              Thanks for to have read

               

              Muppet Mark wrote:

               

              I have been stuck with this before now and as far as I see you have NO access via script to 'appearance' nor do they give you a bail out option where it can be detected and you close… This is very bad IMO…

               

              I totally agree with you

               

              chris gebab wrote:

               

              Hi Chrome,

               

              you must change the appearance, no chance (?) (cs3).

              except you move it outside the group (with the appearance)

              so the group will be deleted.

              something like that(where ad is document):

               

              var obj= ad.groupItems[0](stroke=blue).compoundPathItems[0](stroke=no)
              var lay = ad.layers[0];
              obj.move(lay,ElementPlacement.INSIDE)

               

              but, how to know if there is a appearance, and

              how to get the color ?

              once more i know why i hate this appearance thing

               

              helps this? or is it not what you want to hear?

              Chris

              I have 189 files which each contains 10 'appearance' text (like as '1' in sent file not '2'), i need to change each one to magenta 100% (fillColor & stroke)..

              Dirty job by hand!

              Fortunately, all stroke are at 0,75pt.. and base on same file (just content's text change for each.. same size, same position..) So.. i don't need to know if there is appearance, and know color.. just change for 100% Magenta.

              Unfortunately, i don't enough time... ARRGGHHH !..

               

              Many thanks again guys

               

              art.chrome

              • 4. Re: Who's able to change color of this ?
                chris gebab Community Member

                Got it, I think.

                whats about that:

                 

                a new Doc with the textframe you need (whitout appearance and magenta color) as template.

                duplicate the textframe and copie the .contents from your old file to it.

                move the Duplicate to the old file, remove the old textframe

                 

                Chris

                • 5. Re: Who's able to change color of this ?
                  artchrome Community Member

                  Chris,

                  chris gebab wrote:

                   

                  Got it, I think.

                  whats about that:

                   

                  a new Doc with the textframe you need (whitout appearance and magenta color) as template.

                  duplicate the textframe and copie the .contents from your old file to it.

                  move the Duplicate to the old file, remove the old textframe

                   

                  Chris

                  Humm...

                  It should works.. it surely the best way (for my case)..

                  i found another way.. but.. other problem appear..

                  i've saved in illustrator 10, So.. appearance will be broken (illustrator create multiple groups (1 fillColor + 1 stroke)).. but texts are broken also (need to convertToNative and jointextFrame -- see this helpfull script & website -- ) and some time special characters are lost or changed . But this method could be usefull for pathItem

                   

                  Thanks for interest for this post

                  art.chrome

                  • 6. Re: Who's able to change color of this ?
                    chris gebab Community Member

                    yes, good to know, for text also maybe:

                     

                    var = contents

                    contents = " "

                    save as ai10 & reopen

                    contents = var 

                     

                    maybe?

                    • 7. Re: Who's able to change color of this ?
                      artchrome Community Member

                      chris gebab wrote:

                       

                      yes, good to know, for text also maybe:

                       

                      var = contents

                      contents = " "

                      save as ai10 & reopen

                      contents = var 

                       

                      maybe?

                      Yes but no

                       

                      when you make var = contens, you loose the format's text (i think about text area)

                      and when you make contens = var, text will be point text no text area, moreover all other parameters of styles / formating.

                      but of course you can store each parameter of a text, in array() or again compare old (CS3) with new (AI 10).. long script and many conditions (if/then)..

                       

                      //-----------------//

                       

                      It seems, (i've not tested yet), we can apply graphicStyle on appearance item, so it mean that we can change color, unfortunately (of course) we cannot create by script a graphicStyle ARRGGGH !..

                      manually so..

                       

                      art.chrome

                      • 8. Re: Who's able to change color of this ?
                        Muppet Mark-QAl63s Community Member

                        With AppleScript it would be possible to select all or each page item in turn and then check if the menubar/object/Expand Appearance is 'enabled' if any art has used 'appearance' then it should be true. I only ran some basic testing. Given that AppleScript could also expand it too running the menu item or an action. If you don't mind dealing with group items then you could run batch action to select all or text then expand appearance to groups?

                        • 9. Re: Who's able to change color of this ?
                          artchrome Community Member

                          Muppet Mark,

                           

                          Good to know,

                          unfortunately i'm not familliar with appelscript (i'm not converted to applescript ! )

                           

                          chrome