marco is a text frame (one of the 36 in the doc created this way) returned by crear_marco() function. I have dived into the forum and I have found the use of (true, true) after object style name in order to override all that can be overrided.
But the style must center the text in the frame, and it isn't. The style in the panel have the damned '+' sign beside it. If I use mouse's rigth button and apply the overrides manually, it works.
What I'm doing wrong?
Any help will be welcome.
PD: sorry for my english, it's not so good like I wish...
Adobe Community Professional, Mar 18, 2021Mar 18, 2021
Laubender • Adobe Community Professional, Mar 18, 2021Mar 18, 2021
Hi Mammon_2, could you show some screenshots of the issue? Before running the script, after running the script. What will happen if you change the values for the second and third argument of the method applyObjectStyle() ? Did you test that with all possible values? true, true true, false false, true false, false What's your version of InDesign? What's your operating system? Are you able to apply the object style using the graphical user interface so that your result has no overrides? ...
Basically, I give to Indesign the placeholders that I want to replace with desided elements. Every text frame in the pattern contents the code of an element (M for the name of month, D5 for the days of month in 5 rows - D1 for 1 row, D6 for 6 rows-, MAM for name of previous month and so on). The script recopiles the info of each placeholder (code, size and position), holidays, special events, moon phases, colors, etc and creates a full calendar (1 page, 12 pages or 12 calendar pages + 12 picture pages + 1 cover).
2. I tried minutes ago. Nothing works.
3. Indesign 2021 - 16.1. Tried 2020, 2019... and I have the same behaviour (I have been working in this script for some years, adding functionalities and improving it. That's the V 7.5)
4. Windows 10 64 bits, updated to the last version.
5. Aaaaaand... we have a WINNER! I tried to apply the style from GUI, like you advise me. Hmmmm the damned + remains... What if I apply first [None] and then my style? DING DING DING! GOTCHA!
So I add one line applying the style [None] before the one that apply my style, and now it works (sorry, editor tell me that there's and error in the code pasted...)
Which shows that you just have to ask the right questions to solve a problem, and you do it.
If you see another answer now that you have all the info, I'll thank you.