Copy link to clipboard
Copied
Hi Everyone,
I need a script to collect the colors name used in the text and objects of active document. To collect in the log file or append in the same document
Hi vijayar4612444,
Hans Haesler once wrote a script to remove all unused colors of a document.
Could help you to get the ones that are actually used.
UnbenutzteFarbfelder
Regards,
Uwe Laubender
( ACP )
Copy link to clipboard
Copied
Hi Vijay, seems you have mistook the purpose of this forum. You are not supposed to ask for readymade solutions here with just a single statement like "i want this". This is peer to peer forum where people help each other out or ask for suggestions on how to improve upon what they have been working upon. So either come up with a problem statement that shows what you have been working on, like in this case a script that you might have written that does not work as per your needs, someone will look at it and provides suggestions. Or else you are free to browse the forum to search for pieces of code that you can stitch together for your needs. I am sure everything you need for this solution has already been discussed here before, look around collect the pieces and you have a solution.
-Manan
Copy link to clipboard
Copied
For your Information, for learning and get the information purpose only I raised it. I have already searched in the forum about it but i can't get any solutions needed. Maybe if available please share and dont point me like that..
Copy link to clipboard
Copied
This is not how you learn, i gave you a suggestion in good faith but you took it in a wrong way. What did you do so far that we can help you out, did you share any code you wrote? In the other threads also, i see you abandon the thread once someone points you this same thing as i did. It's your wish on how you take it, this way you will drive away responses away from your threads pretty fast.
-Manan
Copy link to clipboard
Copied
If you think I have misuse this forum. Not like that and what thread will you share it if I abondon?
Copy link to clipboard
Copied
Again you are misunderstanding me, i never said you misused the forum i said you are not using the forum in a proper way. What i am trying to make you understand is share something that you did try and did not work for you and ask specific issues like "i have written this code it works but so and so case does not work properly can someone help"? If you do it this way, you would have more helping people around. If you just come with question like i need this to be done, you have very slim chances of getting a response as you already must have noticed in this, as well as the previous thread you posted about color where you got asked if you were willing to hire a developer for the job.
Also i replied to a previous thread of yours on pdfpresets, i gave you some code you responded with a code yourself which had issues i told you the issues you did not respond back on it since, that gives a wrong indication. The person answering you spends time make good use of it if you can. I am done explaining here for now.
-Manan
Copy link to clipboard
Copied
K fine this is my code I tried,
I have able to get the color name used in the objects but I cant able to get the color used in the text.
Copy link to clipboard
Copied
Sorry! called function name is different as above dont considered that.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hello vijayar4612444 ,
you could try this.....
myTxtColor.push(doc.stories[j].texts.fillColor.name)
I did not have a chance to test it.
Regards
Mike
Copy link to clipboard
Copied
Hi Mike thanks
I tried the code above you mentioned but it got below error.
 
Copy link to clipboard
Copied
Change texts to texts[0] and then try
-Manan
Copy link to clipboard
Copied
Hi vijayar4612444,
Hans Haesler once wrote a script to remove all unused colors of a document.
Could help you to get the ones that are actually used.
UnbenutzteFarbfelder
Regards,
Uwe Laubender
( ACP )