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

Explorer ,
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

69

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

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

Explorer ,
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

70

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
Nov 22, 2020 0
Advocate ,
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
Reply
Loading...
Nov 22, 2020 0
Adobe Community Professional ,
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
Reply
Loading...
Nov 22, 2020 1
Advocate ,
Nov 22, 2020

Copy link to clipboard

Copied

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
Reply
Loading...
Nov 22, 2020 0