English 中文(简体)
在 " 扩展Script " 设计中,我如何从方案上明确选择文本?
原标题:How can I programmatically clear text selection in InDesign with ExtendScript?

我用扩展Script在设计中按方案选择了一些文字:

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

我现在如何取消它? 是不是没有此功能, 比如 app. clearSections (); 或类似的东西?

最佳回答

尝试 :

app.activeDocument.select(NothingEnum.NOTHING);
问题回答

暂无回答




相关问题
How to find out the coordinates of rotated textframe

With the help of (idml) itemtransform horizontal / vertical distances and path point arrays, I can find out the coordinates of text frame (x1,y1), (x2,y2), (x3,y3), (x4,y4). If the textframe is ...

InDesign Scripting: Need to export INDD file as INX (INDX)

I m working with InDesign CS4 and CS3. Both need to export their files down to CS2. I d like to use a .jsx code snippet to export to INDX, but I can t seem to do-so with the ExportFormat."formatName" ...

InDesign CS4 - Javascript - Make a TextArea Transparent

Within the InDesign CS4 designer, I can very easily make a TextArea transparent. I just right click on the TextArea within a document, select Effects-->Transparency, and within the “Effects” window ...

热门标签