🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #2411

Re: [CS4][JS] Accessing skewed text items

#2411
From: Douglas_Neale
Date: Thu, 18 Dec 2008 14:53
40 lines
2494 bytes
Hi Peter,

I tried this on a single page document with some text set in italics:

//Clear the find/change preferences.
    app.findTextPreferences = NothingEnum.nothing;
    app.changeTextPreferences = NothingEnum.nothing;
    //Set the find options.
    app.findChangeTextOptions.caseSensitive = false;
    app.findChangeTextOptions.includeFootnotes = false;
    app.findChangeTextOptions.includeHiddenLayers = false;
    app.findChangeTextOptions.includeLockedLayersForFind = false;
    app.findChangeTextOptions.includeLockedStoriesForFind = false;
    app.findChangeTextOptions.includeMasterPages = false;
    app.findChangeTextOptions.wholeWord = false;
    //Search the document for all the skewed text
    app.findTextPreferences.skew = 1;
   
    var myFound = app.activeDocument.findText();
   
   
    if (myFound.length==0)  {
        alert("No skewed text was found");
    }
    else {
        // ok we have some skewed text, now loop through each one
        for (i =0; i < myFound.length; i++) {
            var myTextObject = myFound[i];
            var myText = myTextObject.Content;
        }
    }

and it always finishes up with the alert :-(
and debug confirmed that myFound.length was zero.

Should I be doing something else to find italic text?

Regards,

Doug Neale
Technical Details
Message-ID: <494A6403.8070608@dougneale.co.uk>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!postnews.google.com!news2.google.com!npeer01.iad.highwinds-media.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!newshub.sdsu.edu!webcrossing
References: <4949337E.70400@dougneale.co.uk>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,3c0799f6a55c6d61
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: Douglas_Neale@adobeforums.com
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!postnews.google.com!news2.google.com!npeer01.iad.highwinds-media.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: [CS4][JS] Accessing skewed text items
Message-ID: <494A6403.8070608@dougneale.co.uk>
Date: Thu, 18 Dec 2008 06:53:55 -0800
References: <4949337E.70400@dougneale.co.uk>
Lines: 40
 by mrelayeu.kundenserver.de (node=mrelayeu3) with ESMTP (Nemesis)
 id 0MKxQS-1LDKGD1DPB-0002Gu; Thu, 18 Dec 2008 15:53:57 +0100
User-Agent: Thunderbird 2.0.0.18 (Windows/20081105)
X-Antivirus: avast! (VPS 081217-0, 17/12/2008), Outbound message
X-Antivirus-Status: Clean
X-Provags-ID: V01U2FsdGVkX198owX3zZCGQfBYjTN6ilc5f0YoB00mM3r6Eqm
 mX7XhRtJwbwpD+Ri5dKyGz3/vnHOaI6H+qmVN7OIHoFSYoc5SI
 YLEBFzCRFJ8ou+O1sXNHLUiXbRYI64R
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit