Article View: adobe.scripting.indesign
Article #18985How to work around a bug? [AS]
From: Richard Ronnback
Date: Wed, 12 Feb 2003 07:29
Date: Wed, 12 Feb 2003 07:29
23 lines
1804 bytes
1804 bytes
I made a script to change the applied language of every story on a layer and it works, but only if the selected language has been applied somewhere in the document before I run the script. I assume it is the same bug that prevents you from making a paragraph style with a different language (unless the language is already applied somewhere in the document) Any ideas how to work around this bug? Here's the script: tell application "InDesign 2.0.1" set myDocument to active document set myLayers to name of layers of myDocument set myChosenLayer to (choose from list myLayers with prompt "Please select the layer you like to set language for") as string set myLanguages to name of languages set myChosenLanguage to (choose from list myLanguages with prompt "Please select the language you like to apply") as string set myStories to (object reference of parent story of text frames of layer myChosenLayer of myDocument) whose (text frame index is 1) repeat with i in myStories set applied language of i to myChosenLanguage end repeat end tell
Technical Details
Message-ID:
<1de7d137.-1@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebXShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f939a,f18047cf404d6b6c,start X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-02-11 23:38:04 PST From: "Richard Ronnback" <richard.ronnback@telia.com> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!news.maxwell.syr.edu!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: How to work around a bug? [AS] Message-ID: <1de7d137.-1@WebX.la2eafNXanI> Date: Tue, 11 Feb 2003 23:29:48 -0800 Lines: 29 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit