Bonjour,
voici un bout de code qu'il suffit de copier et de coller sous applescript editor pour se rendre compte que la command "auto grow" ne fonctionne pas...
si qq'un a une soluce...?
merci d'avance
------------------------------------------------------------------------
set varstring to "contenu cellule 1"
set i to 0
tell application "InDesign 2.0.2"
set mystartColumnColor to make color with properties {name:"mystartColumnColor", color value:{50, 0, 50, 0}}
set mydocument to make document
tell mydocument
set myHighColor to make color with properties {name:" myHighColor", color value:{50, 0, 50, 0}}
set myLowColor to make color with properties {name:" myHighColor", color value:{25, 0, 25, 0}}
tell page (count of pages)
repeat 5 times
set i to i + 1
if i is equal to 5 then
set varstring to varstring & "contenu cellule 1" & tab & "contenu" & tab & "contenu" & tab & "contenu"
else
set varstring to varstring & tab & "contenu cellule 2" & tab & "contenu cellule 3" & tab & "contenu cellule 4" & return
end if
end repeat
set myTextFrameTableau to make text frame with properties ¬
{geometric bounds:{15, 15, 100, 200}, contents:varstring}
tell text style range 1 of parent of myTextFrameTableau
set mytableau to make table of myTextFrameTableau
tell mytableau
--bord tableau
set left border stroke weight of mytableau to 0
set right border stroke weight of mytableau to 0
set top border stroke weight of mytableau to 0.3
set bottom border stroke weight of mytableau to 0.3
--colonnes
set start column stroke count of mytableau to 1
set end column stroke count of mytableau to 1
set start column stroke weight of mytableau to 0
set end column stroke weight of mytableau to 0
--set column 2 to auto grow
--lignes
set skip first alternating fill rows of mytableau to 0
set start row stroke count of mytableau to 1
set start row fill color of mytableau to myHighColor
set end row stroke count of mytableau to 1
set start row stroke weight of mytableau to 0 --0.1
set end row stroke weight of mytableau to 0 --0.1
set end row fill color of mytableau to myHighColor
tell column 1
set auto grow of column 1 of mytableau to true
end tell
set x to count of rows of mytableau
repeat with T from 1 to x
set VARX to (T mod 2)
if VARX is equal to 1 then
set fill color of row T of mytableau to myHighColor
else
set fill color of row T of mytableau to myLowColor
end if
end repeat
move myTextFrameTableau to {15, 15}
end tell
end tell
end tell
end tell
end tell
------------------------------------------------------------------------
voici un bout de code qu'il suffit de copier et de coller sous applescript editor pour se rendre compte que la command "auto grow" ne fonctionne pas...
si qq'un a une soluce...?
merci d'avance
------------------------------------------------------------------------
set varstring to "contenu cellule 1"
set i to 0
tell application "InDesign 2.0.2"
set mystartColumnColor to make color with properties {name:"mystartColumnColor", color value:{50, 0, 50, 0}}
set mydocument to make document
tell mydocument
set myHighColor to make color with properties {name:" myHighColor", color value:{50, 0, 50, 0}}
set myLowColor to make color with properties {name:" myHighColor", color value:{25, 0, 25, 0}}
tell page (count of pages)
repeat 5 times
set i to i + 1
if i is equal to 5 then
set varstring to varstring & "contenu cellule 1" & tab & "contenu" & tab & "contenu" & tab & "contenu"
else
set varstring to varstring & tab & "contenu cellule 2" & tab & "contenu cellule 3" & tab & "contenu cellule 4" & return
end if
end repeat
set myTextFrameTableau to make text frame with properties ¬
{geometric bounds:{15, 15, 100, 200}, contents:varstring}
tell text style range 1 of parent of myTextFrameTableau
set mytableau to make table of myTextFrameTableau
tell mytableau
--bord tableau
set left border stroke weight of mytableau to 0
set right border stroke weight of mytableau to 0
set top border stroke weight of mytableau to 0.3
set bottom border stroke weight of mytableau to 0.3
--colonnes
set start column stroke count of mytableau to 1
set end column stroke count of mytableau to 1
set start column stroke weight of mytableau to 0
set end column stroke weight of mytableau to 0
--set column 2 to auto grow
--lignes
set skip first alternating fill rows of mytableau to 0
set start row stroke count of mytableau to 1
set start row fill color of mytableau to myHighColor
set end row stroke count of mytableau to 1
set start row stroke weight of mytableau to 0 --0.1
set end row stroke weight of mytableau to 0 --0.1
set end row fill color of mytableau to myHighColor
tell column 1
set auto grow of column 1 of mytableau to true
end tell
set x to count of rows of mytableau
repeat with T from 1 to x
set VARX to (T mod 2)
if VARX is equal to 1 then
set fill color of row T of mytableau to myHighColor
else
set fill color of row T of mytableau to myLowColor
end if
end repeat
move myTextFrameTableau to {15, 15}
end tell
end tell
end tell
end tell
end tell
------------------------------------------------------------------------