Copy link to clipboard
Copied
Hi,
How to write Javascript
1. to Change the Text Thread color?
2. to Show the text thread?
Thanks a million!
you can use:
app.menuActions.item("$ID/Show Text Threads").invoke();
to show the linkages between text boxes (it is the same as selecting the menu 'View:Show Text Threads")
app.menuActions.item("$ID/Hide Text Threads").invoke();
will hide them.
I did a quick test, and there's something funky going on behind the scenes if you manually turn threads on and off through the menus, but this code seems to be reliable regardless of initial setting.
var showThreads = app.menuActions.item("$ID/Show Text Thread
...Copy link to clipboard
Copied
How to write Javascript
1. to Change the Text Thread color?
what do you mean - color of Text, color of background of TextFrames, color of TextFrames edges, etc. ?
2. to Show the text thread?
and again - show what ? lines between TextFrames showing TextFrames links ? or something else ?
robin
www.adobescripts.co.uk
Copy link to clipboard
Copied
to change the thread color, mine text thread is light gray in color.
Can change this color using JS?
Thanks alot.
Copy link to clipboard
Copied
and also using JS to Show the text thread..
Copy link to clipboard
Copied
A text thread doesn't have a color, per se. It inherits the color from the UI color of the layer holding the text frames. Specifically, the thread connector is shown using the color of the "before" text frame.
So, to change the color, you can either change the UI color of the layer holding the text frames or change the itemLayer of the frames.
As to your second question, I don't think the show text threads option is exposed to scripting.
Dave
Copy link to clipboard
Copied
I don't think the show text threads option is exposed to scripting.
I searched in vain for text threads, first in ViewPreferences (the logical place), then with an exhaustive search all through the help. It's not there.
A strange omission, although not one that has been reported AWOL straightaway, so perhaps it's not that crucial to anyone else. Perhaps Ole knows why, if there is reason.
Copy link to clipboard
Copied
pardon me.. who's Ole?
Is he/she from Adobe?
Copy link to clipboard
Copied
hi
Ole is "he" and is from Adobe ![]()
you can find him somewhere here on forum ![]()
robin
www.adobescripts.co.uk
Copy link to clipboard
Copied
To further enlighten you: Ole's full name is Olav Martin Kvern. He's the one who started this (scripting) forum and he "wrote the book" on InDesign and scripting (many of them...) ![]()
Harbs
Copy link to clipboard
Copied
Oh.. so I know another Indesign expert here in this forum. ![]()
anyway..
I would like to thank you people who have offered help and advice to an Indesign novice like me.
Many Thanks to You!! ![]()
Copy link to clipboard
Copied
you can use:
app.menuActions.item("$ID/Show Text Threads").invoke();
to show the linkages between text boxes (it is the same as selecting the menu 'View:Show Text Threads")
app.menuActions.item("$ID/Hide Text Threads").invoke();
will hide them.
I did a quick test, and there's something funky going on behind the scenes if you manually turn threads on and off through the menus, but this code seems to be reliable regardless of initial setting.
var showThreads = app.menuActions.item("$ID/Show Text Threads");
try {showThreads.invoke()} catch (givenError){};
var hideThreads = app.menuActions.item("$ID/Hide Text Threads");
try {hideThreads.invoke()} catch (givenError){};
Note that this actually leaves threads "ON", but that's why it's 'funky'. (Or I'm just not getting what's actually going on...)
--
Wölf
Copy link to clipboard
Copied
ya.. it works somehow. I also don't really understand ![]()
Thanks alot!
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more