Article View: adobe.scripting.indesign
Article #19051tell special textpart - need help (AS)
From: Armin.Egginger
Date: Tue, 21 Jan 2003 12:30
Date: Tue, 21 Jan 2003 12:30
70 lines
3694 bytes
3694 bytes
Hi ID-Scripter,
I try at the moment to tell(set applied character style) a special part from the cell-text, but I don't find any way. I think it is easy for you, but not for me at the moment.
enclosed pls find a shorted script, that shows the problem. You need a active document with one textframe which includes a table. This script is not the original -the original is more than 3 times bigger- it is only to show the problem.
global myDocument, thecellcount
--Handler
on setTheStyle()
tell application "InDesign 2.0.2"
set myTable to table 1 of text frame 1 of page 1 of myDocument
set ln to 1
tell myTable
set properties of line ln of cell thecellcount to {applied character style:"1"}
set ln to ln + 1
set properties of line ln of cell thecellcount to {applied character style:"2"}
set ln to ln + 1
set properties of line ln of cell thecellcount to {applied character style:"2"}
set ln to ln + 1
set properties of line ln of cell thecellcount to {applied character style:"2"}
set ln to ln + 1
set properties of line ln of cell thecellcount to {applied character style:"2"}
set ln to ln + 1
(* This is the problem! How is it possible to tell the "goods:" textblock ? -
this textblock is not fixed in the size/lenght*)
set properties of story ln of cell thecellcount to {applied character style:"3"}
-- I tried story ln
-- I tried text column with number
-- I tried a reference of story
-- but I never got only the textpart with the "goods:"
set ln to ln + 1
(* the same problem with the "person:" and "represented by:" textblock
set properties of story ln of cell thecellcount to {applied character style:"4"}
set ln to ln + 1
set properties of story ln of cell thecellcount to {applied character style:"5"}
set ln to ln + 1*)
end tell
end tell
end setTheStyle
--Script
tell application "InDesign 2.0.2"
set myDocument to active document
set myTable to table 1 of text frame 1 of page 1 of myDocument
tell myTable
set properties to {row count:6, column count:3}
set properties of column 1 to {width:100}
set properties of column 2 to {width:30}
set properties of column 3 to {width:25, vertical justification:top, bottom inset:0, left inset:0, right inset:0, top inset:0}
set thecellcount to 1
set contents of cell thecellcount to "A-MAZING SHOP
Oxford Street 3
Fax: +49/89/6147381 - Tel.: +49/89/6147381
www.amazingshop.com
goods: bikes, handlebars, grips, wheels, rims, hubs, shoes, tools, stems, brakes, derailleur, shifters.....
person: Mr. Thomas Member, Mrs. Elvira High, Mr. Stephen Top
represented by: Testcompany 12, Seattle, USA"
set contents of cell (thecellcount + 1) to "1818"
end tell
setTheStyle() of me
end tell
How is it possible to get a reference for this special textpart?
Many thanks
Armin
The ID-scripting-beginner
Technical Details
Message-ID:
<1de779af.-1@WebX.la2eafNXanI>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!newsfeed.gamma.ru!Gamma.RU!colt.net!diablo.theplanet.net!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!fr.clara.net!heighliner.fr.clara.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,72c4916cc668e15a,start X-Google-Attributes: gidf939a,public X-Google-ArrivalTime: 2003-01-21 04:38:13 PST From: Armin.Egginger <armin.egginger@gmx.de> Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-09!supernews.com!newsfeed.gamma.ru!Gamma.RU!colt.net!diablo.theplanet.net!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!WebX Newsgroups: adobe.scripting.indesign Subject: tell special textpart - need help (AS) Message-ID: <1de779af.-1@WebX.la2eafNXanI> Date: Tue, 21 Jan 2003 04:30:30 -0800 Lines: 87 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit