Adobe InDesign Найти / изменить скрипт - PullRequest
0 голосов
/ 22 апреля 2020

Чтобы упростить мою работу с InDesign, я сгенерировал этот скрипт Find / Change с помощью chainGREP. Это только часть кода:

// Query [[Query GREP1]] -- If you delete this comment you break the update function
        try {
            app.findChangeGrepOptions.properties = ({includeHiddenLayers:true, includeMasterPages:true, includeFootnotes:true, kanaSensitive:true, widthSensitive:true});
            app.findGrepPreferences.properties = ({justification:1667591796, appliedFont:"Open Sans", fontStyle:"Bold", pointSize:10});
            app.changeGrepPreferences.properties = ({paragraphDirection:1379028068, characterDirection:1147496036, digitsType:1684627826, kashidas:1801544805, justification:1667591796, composer:"Adobe World-Ready Paragraph Composer", appliedFont:"Adobe Arabic", fontStyle:"Bold", pointSize:15, leading:15, appliedLanguage:"Arabic"});
            changeObject.changeGrep();
        } catch (e) {alert(e + ' at line ' + e.line)}
        app.findGrepPreferences = NothingEnum.NOTHING;
        app.changeGrepPreferences = NothingEnum.NOTHING;
        // Query [[Query GREP2]] -- If you delete this comment you break the update function
        try {
            app.findChangeGrepOptions.properties = ({includeHiddenLayers:true, includeMasterPages:true, includeFootnotes:true, kanaSensitive:true, widthSensitive:true});
            app.findGrepPreferences.properties = ({justification:1667591796, appliedFont:"Open Sans", pointSize:8});
            app.changeGrepPreferences.properties = ({paragraphDirection:1379028068, digitsType:1684627826, justification:1667591796, composer:"Adobe World-Ready Paragraph Composer", appliedFont:"Adobe Arabic", pointSize:11, leading:11, appliedLanguage:"Arabic"});
            changeObject.changeGrep();
        } catch (e) {alert(e + ' at line ' + e.line)}
        app.findGrepPreferences = NothingEnum.NOTHING;
        app.changeGrepPreferences = NothingEnum.NOTHING;
        // Query [[Query GREP3]] -- If you delete this comment you break the update function
        try {
            app.findChangeGrepOptions.properties = ({includeHiddenLayers:true, includeMasterPages:true, includeFootnotes:true, kanaSensitive:true, widthSensitive:true});
            app.findGrepPreferences.properties = ({justification:1667591796, appliedFont:"Open Sans", pointSize:11});
            app.changeGrepPreferences.properties = ({paragraphDirection:1379028068, characterDirection:1147496036, digitsType:1684627826, kashidas:1801544805, justification:1667591796, composer:"Adobe World-Ready Paragraph Composer", appliedFont:"Adobe Arabic", pointSize:15, leading:15, appliedLanguage:"Arabic"});
            changeObject.changeGrep();
        } catch (e) {alert(e + ' at line ' + e.line)}

Есть только один вопрос. Можно ли поместить pointSize в диапазон, например.

pointSize>=10 && pointSize<=10.5

Или, может быть, есть более простой способ автоматизации поиска / изменения?

...