How do I set alignment in a text frame from within a script?
I have tried what I think are all options to get centered text in a text frame created within a script. What I'm trying to do is create a text frame with known dimensions and known contents that should be centered and the frame should be on the same page of the document as a selected image frame. In other words, I'm trying to put a centered caption below an image.I get so close -- I can get the correct frame size and position on the page, but it is located on the previous page! And whatever I do, the contents are always left-aligned. [I tried assigning a style with centering, and I tried assigning Justification,centerAlign to the justification attribute of the contents of the text frame. But the text is always on the left end - I can get it centered only by going in with the text tool and then choosing centering from the options above the page display.] I tried moving the frame by one page, but I cannot figure that one out (in particular, how to tell it to move the frame by exactly one page). The examples in the CS6 scripting document show examples (page 114) that do not work - I get a complaint about having "undefined" as the first parameter of move - that is explicitly pointed out in the scripting document! Does anyone have any suggestions about this? I spared you the coding attempts that I've made, but I could send them to you if that would help.
Thanks in advance,,,,,
