Article View: adobe.scripting.indesign
Article #1056Re: it can not search the text with Grep, what's wronge with my code?
From: robin521
Date: Mon, 23 Feb 2009 06:41
Date: Mon, 23 Feb 2009 06:41
33 lines
1893 bytes
1893 bytes
Hi peter,
Sorry for late, i can not post my message.
I got it, Cause of low memory, I have already change it, but how can i change desiredWordSpacing=130 what i find? I need to change all character to desiredWordSpacing=130.
try{
if(app.documents.length ==0){
alert("您没有打开任何文档!");
}
}
catch(e){
}
//Clear the find/change preferences.
app.findGrepPreferences = NothingEnum.nothing;
app.changeGrepPreferences = NothingEnum.nothing;
//Set the find options.
app.findChangeGrepOptions.includeFootnotes = false;
app.findChangeGrepOptions.includeHiddenLayers = false;
app.findChangeGrepOptions.includeLockedLayersForFind = false;
app.findChangeGrepOptions.includeLockedStoriesForFind = false;
app.findChangeGrepOptions.includeMasterPages = false;
//找到匹配的阿拉伯文文字进行修改.
app.findGrepPreferences.findWhat = "[^A-Za-z0-9\\.-]+";
app.changeGrepPreferences.appliedFont="Arial"
app.documents.item(0).changeGrep();
//Clear the find/change preferences after the search.
app.findGrepPreferences = NothingEnum.nothing;
app.changeGrepPreferences = NothingEnum.nothing;
Technical Details
Message-ID:
<59b7f00d.5@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!newshub.sdsu.edu!webcrossingReferences:
<59b7f00d.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,72cfdd46072287ca X-Google-Attributes: gidf939a,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: robin521@adobeforums.com Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.scripting.indesign Subject: Re: it can not search the text with Grep, what's wronge with my code? Message-ID: <59b7f00d.5@webcrossing.la2eafNXanI> Date: Sun, 22 Feb 2009 22:41:07 -0800 References: <59b7f00d.-1@webcrossing.la2eafNXanI> Lines: 37 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit