Is there a way in InDesign to directly apply a script to add symbols to the selected "specific text"

Explorer ,
Nov 22, 2020 Nov 22, 2020

Copy link to clipboard

Copied

For example, when I select  Overview 
Run the script, it can become 【overview】
Or (overview)

That is, you can add 【】 or () symbols to the selected content, which is the same as the function in the "subline text" software

Similar to replace function

Similar to the replacement function, but 【】() is something I can set.
Then set different shortcut keys for different scripts

TOPICS
Bug, How to, Import and export, Scripting

Views

93

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Advocate , Nov 22, 2020 Nov 22, 2020
Oups!  =DThanks Peter! (^/)

Likes

Translate

Translate
Advocate ,
Nov 22, 2020 Nov 22, 2020

Copy link to clipboard

Copied

app.selection[0].contents = "[" + app.selection[0] + "]";

 

(^/)  The Jedi

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Nov 22, 2020 Nov 22, 2020

Copy link to clipboard

Copied

Small correction:

app.selection[0].contents = "[" + app.selection[0].contents + "]";

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 22, 2020 Nov 22, 2020

Copy link to clipboard

Copied

LATEST

Oups!  =D

Thanks Peter!

 

(^/)

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines