Article View: adobe.scripting.indesign
Article #9681[AppleScript] the allTables issue
From: teszeract
Date: Thu, 20 Jul 2006 12:59
Date: Thu, 20 Jul 2006 12:59
52 lines
2306 bytes
2306 bytes
Hello
my first script for InDesign is as it is below. It works when I select all cells of a table and run the script. But I cannot figure out how to implement the the snippet that performs the action on ALL tables in the document into my script and make it work as well. Any help would be gratefully appreciated. I am on OS X 10.4.7 using IDCS2.
-- the commands to introduce
set allTables to every table of every story of document 1
repeat with i from 1 to count of allTables
tell item i of allTables
--my script starts
tell application "InDesign CS"
activate
set myDoc to active document
tell myDoc
set BlackColor to color "Black"
set myTable to item 1 of selection
set SolidStroke to stroke style "Solid"
tell myDoc
try
tell selection
set properties of myTable to �
{inner column stroke weight:0.25 �
, inner row stroke weight:0.25 �
, top edge stroke weight:0.25 �
, bottom edge stroke weight:0.25 �
, left edge stroke weight:0.25 �
, right edge stroke weight:0.25} �
set properties of myTable to �
{inner column stroke color:BlackColor �
, inner row stroke color:BlackColor �
, left edge stroke color:color BlackColor �
, right edge stroke color:color BlackColor �
, bottom edge stroke color:BlackColor �
, top edge stroke color:BlackColor}
set properties of myTable to �
{inner column stroke type:SolidStroke �
, inner row stroke type:SolidStroke �
, left edge stroke type:SolidStroke �
, right edge stroke type:SolidStroke �
, bottom edge stroke type:SolidStroke �
, top edge stroke type:SolidStroke}
set properties of myTable to {left inset:1, right inset:1, top inset:1, bottom inset:1}
end tell
end try
end tell
end tell
end tell
-- my script ends
Technical Details
Message-ID:
<3bc0fa5c.-1@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!syros.belnet.be!news.belnet.be!news.stben.net!webcrossingShow Full Headers
Complete Article Headers
X-Google-Thread: f939a,298c2d190edc36d,start X-Google-Attributes: gidf939a,public X-Google-Language: ENGLISH,ASCII From: teszeract@adobeforums.com Newsgroups: adobe.scripting.indesign Subject: [AppleScript] the allTables issue Message-ID: <3bc0fa5c.-1@webcrossing.la2eafNXanI> Date: Thu, 20 Jul 2006 05:59:31 -0700 Lines: 57 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Path: arc1-ca.pugleaf.net!g2news2.google.com!news3.google.com!news.glorb.com!syros.belnet.be!news.belnet.be!news.stben.net!webcrossing