🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #888

Re: [JS, CS3] Creating a new boolean object. Is it possible?

#888
From: Peter Kahrel
Date: Fri, 27 Feb 2009 23:02
11 lines
1727 bytes
Len,

Your current approach is the only feasible one. You can't create new properties for Indesign's objects. In some cases it's easy: text frames, for instance, can have their label set to a certain value, as can several other objects (cells, the application, etc.).

But characters don't have the label property, so you have to use an existing property, as you did with overstrike. If you don't like using that particular one, have a look through the OMV under "Character" and see if there's a property that suits your needs better than overstrike.

What you can use use this: in a script you can assign a character (text, word, etc.) an underline colour without setting underline. In the interface you'd have to enable underline, then set a colour, then disable underline. In a script enabling and disabling underline isn't necessary: just set myCharacter.underlineColor to some value ('Black' for "yes", 'White' for "no" or something like that).

So though you can't add new properties to characters, they have so many already that you're sure to find one you can exploit.

Peter
Technical Details
Message-ID: <59b80f93.1@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newshub.sdsu.edu!webcrossing
References: <59b80f93.-1@webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,2650d9a3bbbf97f7
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Peter Kahrel" <kahrel@kahrel.plus.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: [JS, CS3] Creating a new boolean object. Is it possible?
Message-ID: <59b80f93.1@webcrossing.la2eafNXanI>
Date: Fri, 27 Feb 2009 15:02:01 -0800
References: <59b80f93.-1@webcrossing.la2eafNXanI>
Lines: 23
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit