Take the 2-minute tour ×
Graphic Design Stack Exchange is a question and answer site for Graphic Design professionals, students, and enthusiasts. It's 100% free, no registration required.

I have a table with digits. I want to change the percentage of the fill of each cell to this digit. Example: enter image description here

share|improve this question
3  
Thanks for solving your own question, Pylyp! Would you mind posting the answer separate, as an actual answer and accept it? That way we can archive the Q&A properly. –  Bakabaka Nov 7 '13 at 15:08
    
Users with less than 10 reputation can't answer their own question for 8 hours after asking. –  Pylyp Nov 7 '13 at 19:16
1  
@Pylyp Upvoted! Now you have 16 rep :) –  Yisela Nov 7 '13 at 20:14
    
I need more, more reps!!! Mu ha ha! Ok, i did it. –  Pylyp Nov 8 '13 at 8:34
add comment

1 Answer 1

up vote 0 down vote accepted

thanx to Jarek:

Lets assume a textFrame with your table is selected;

var
          mT = app.selection[0].tables[0],
          len = mT.cells.length;

while (len-->0)
          mT.cells[len].fillTint = parseInt(mT.cells[len].contents);
share|improve this answer
    
I confess it: I looked at this and thought "what the heck is an --> operator?!11one Then I realized it should be parsed as (len-- > 0) (i.e. evalulate var len > 0 then decrement) –  horatio Nov 8 '13 at 20:09
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.