• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Extendscript Toolkit - Corrections surlignées

New Here ,
Jun 03, 2016 Jun 03, 2016

Copy link to clipboard

Copied

Bonjour,

j'ai un script le correction de textes dans InDesign (style GREP) super efficace, mais mon problème c'est que j'aimerais que les corrections effectuées soient surlignées pour voir ce qui a été corrigé. Y a-t-il un outil ou un ajout au script que je pourrais faire ?

TOPICS
Scripting

Views

300

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
Engaged ,
Jun 03, 2016 Jun 03, 2016

Copy link to clipboard

Copied

Hi, you could apply Conditional Text additionally by GREP to the changes you made.

Thanks Stefan

Votes

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
LEGEND ,
Jun 03, 2016 Jun 03, 2016

Copy link to clipboard

Copied

Marie-Odile,

You could take a look to this code:

var myDoc = app.activeDocument;

for (var i = 1; i <= 20; i++) {

myCondition = app.activeDocument.conditions.item("Grep_" + (i));

if (!myCondition.isValid)

    {

   myCondition = app.activeDocument.conditions.add ({name: "Grep_" + (i), indicatorMethod: ConditionIndicatorMethod.USE_HIGHLIGHT});

    }

}

app.findGrepPreferences = app.changeGrepPreferences = null;

app.findGrepPreferences.findWhat = "\\b\\w{4}\\b";

app.changeGrepPreferences.appliedConditions = ["Grep_1"];

myDoc.changeGrep();

app.findGrepPreferences = app.changeGrepPreferences = null;

app.findGrepPreferences.findWhat = "\\b\\w{6}\\b";

app.changeGrepPreferences.appliedConditions = ["Grep_2"];

myDoc.changeGrep();

app.findGrepPreferences = app.changeGrepPreferences = null;

app.findGrepPreferences.findWhat = "\\b\\w{8}\\b";

app.changeGrepPreferences.appliedConditions = ["Grep_3"];

myDoc.changeGrep();

app.findGrepPreferences = app.changeGrepPreferences = null;

Before:

Capture d’écran 2016-06-03 à 21.34.25.png

After:

Capture d’écran 2016-06-03 à 21.34.42.png

Votes

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
New Here ,
Jun 03, 2016 Jun 03, 2016

Copy link to clipboard

Copied

Thank you so much. It's work.

Votes

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
Contributor ,
Jun 04, 2016 Jun 04, 2016

Copy link to clipboard

Copied

LATEST

Hi Obi,

Your code simply super

Thanks

Votes

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