[GastForen Programmierung/Entwicklung AppleScript etikettierten Felder werden falsch abgearbeitet (indesign)

  • Suche
  • Hilfe
  • Lesezeichen
  • Benutzerliste
Themen
Beiträge
Moderatoren
Letzter Beitrag

etikettierten Felder werden falsch abgearbeitet (indesign)

jekyll
Beiträge gesamt: 2047

13. Nov 2017, 16:11
Beitrag # 1 von 3
Bewertung:
(2417 mal gelesen)
URL zum Beitrag
Beitrag als Lesezeichen
Hallo Allerseits,
könnte jemand mir sagen warum mein script die "f" Felder nicht korrekt färben will.
Interessante weise wenn ich dieser Rechtecken im Indesign auf Papier setze wird die Papierfarbe geändert.
Setze ich sie auf C 0, M 0, Y 0, K 0 werden alle immer mit den gleichen Farbe gefüllt.

Code
tell application "Adobe InDesign CC 2017" 
tell active document
set logoSwatches to swatches 5 thru -1
repeat with i from 1 to count logoSwatches
set temp to (every item of all page items whose label is ("druckfarbe" & i as string))
set temp1 to (every item of all page items whose label is ("f" & i as string))
repeat with y in temp
if "weiss" is in name of item i of logoSwatches then
set color value of fill color of item 1 of temp1 to color value of item i of logoSwatches
set color value of stroke color of item 1 of temp1 to {0.0, 0.0, 0.0, 0.0}
set text of y to name of item i of logoSwatches
--set fill color of paragraphs of y to item i of logoSwatches
else
set color value of fill color of item 1 of temp1 to color value of item i of logoSwatches
set text of y to name of item i of logoSwatches
--set fill color of paragraphs of y to item i of logoSwatches
end if
tell item 1 of temp to fit given frame to content
end repeat
end repeat
end tell
end tell


hier die indd Datei:
http://www.download.siscosep.com/hds/mein.zip

Danke schon mal.

(Dieser Beitrag wurde von jekyll am 13. Nov 2017, 16:14 geändert)
X

etikettierten Felder werden falsch abgearbeitet (indesign)

TMA
Beiträge gesamt: 399

14. Nov 2017, 07:53
Beitrag # 2 von 3
Beitrag ID: #560678
Bewertung:
(2387 mal gelesen)
URL zum Beitrag
Beitrag als Lesezeichen
Hallo,
die 'color value' brauchst du eigentlich gar nicht.

Code
tell application "Adobe InDesign CC 2017" 
tell active document
set logoSwatches to swatches 5 thru -1
repeat with i from 1 to count logoSwatches
set temp to (every item of all page items whose label is ("druckfarbe" & i as string))
set temp1 to (every item of all page items whose label is ("f" & i as string))
repeat with y in temp
if "weiss" is in name of item i of logoSwatches then
set fill color of item 1 of temp1 to item i of logoSwatches
set color value of stroke color of item 1 of temp1 to {0.0, 0.0, 0.0, 0.0}
set text of y to name of item i of logoSwatches
--set fill color of paragraphs of y to item i of logoSwatches
else
set fill color of item 1 of temp1 to item i of logoSwatches
set text of y to name of item i of logoSwatches
--set fill color of paragraphs of y to item i of logoSwatches
end if
tell item 1 of temp to fit given frame to content
end repeat
end repeat
end tell
end tell


So sollte es gehen.

Gruß
TMA


als Antwort auf: [#560670]
(Dieser Beitrag wurde von TMA am 14. Nov 2017, 08:07 geändert)

etikettierten Felder werden falsch abgearbeitet (indesign)

jekyll
Beiträge gesamt: 2047

14. Nov 2017, 08:36
Beitrag # 3 von 3
Beitrag ID: #560680
Bewertung:
(2377 mal gelesen)
URL zum Beitrag
Beitrag als Lesezeichen
Hallo TMA,
vielen Dank.
Jetzt läuft es.

Interessante weise klappt es bei der outline nicht.
Da habe ich die gleiche Fehler. Dieser konnte ich jetzt nach Deine Hilfe selber korrigieren.


als Antwort auf: [#560678]