How can I programmatically clear text selection in

2019-04-12 10:42发布

I've programmatically selected some text in InDesign using ExtendScript:

app.findGrepPreferences = NothingEnum.nothing;
app.findGrepPreferences.appliedFont = myFont;
var matches = app.activeDocument.findGrep();
if(matches.length > 0) {
  matches[0].select();
}

How can I deselect it now? Is there no function for this, like app.clearSelections(); or something of the sort?

1条回答
疯言疯语
2楼-- · 2019-04-12 11:14

Try with:

app.activeDocument.select(NothingEnum.NOTHING);
查看更多
登录 后发表回答