Copy link to clipboard
Copied
Hi, I'm trying to figure out how to turn the two options off in the preferences for Advanced Type, Type Contextual controls using Applescript.
set properties of type contextual ui prefs to {show alternates ui:false, show fractions ui:false} |
This works only for the first checkbox, but not the second. What is weird is that if I uncheck both checkbox in ID, then set the script values to true, both checkbox get checked, but when I put false, only the first one gets unchecked and the second is still ON. Is this a bug?
Thanks for any help.
Copy link to clipboard
Copied
What happens if you set the values one by one?
tell type contextual ui prefs
set show alternates ui to false
set show fractions ui to false
end tell
Copy link to clipboard
Copied
JeffArdoise wrote:
… Is this a bug?
Yes, That's a known bug.
We are still waiting, that it will get fixed.
Still, there is not a single bug fix version of InDesign CC 2017 v12.0.0.81 from October 2016.
Regards,
Uwe
Copy link to clipboard
Copied
Thanks Uwe, thought I was going crazy
Dirk, it's not working either one by one.
One thing I haven't tried is with javascript, is the bug there too?
TIA
Jeff
Copy link to clipboard
Copied
Yes. ExtendScript gives the same results.
Regards,
Uwe
Copy link to clipboard
Copied
Hi Jeff,
and there is more:
If you select text by scripting, the adornment will not show up, even if the preferences are set to show the adornment.
You asked for AppleScript.
All I can offer is ExtendScript:
// EXAMPLE:
var doc = app.documents.add();
var textFrame = doc.pages[0].textFrames.add
(
{
geometricBounds : ["12.7mm","12.7mm","112.7mm","112.7mm"] ,
contents : "Select this."
}
);
doc.select(textFrame.parentStory.words[0]);
Also selecting the text frame will not invoke the adornment:
doc.select(textFrame);
Instead you have to do something like that as workaround:
1. Select text ( could be an insertion point ), the active tool will be UITools.TYPE_TOOL
2. Change the current tool to the UITools.SELECTION_TOOL
That will select the text frame and is showing the adornment.
var doc = app.documents.add();
var textFrame = doc.pages[0].textFrames.add
(
{
geometricBounds : ["12.7mm","12.7mm","112.7mm","112.7mm"] ,
contents : "Select this."
}
);
doc.select(textFrame.parentStory.words[0]);
// Change tool to select the text frame where the adornment is showing up:
app.toolBoxTools.currentTool = UITools.SELECTION_TOOL;
Regards,
Uwe
Copy link to clipboard
Copied
Jeff -- It's just not scriptable, and that's bad. Please log a feature request at
Feature Request/Bug Report Form
Peter