Copy link to clipboard
Copied
I have this idea: put the last line of every page in a (red) colour
but somethings is failing and the instruction to «end repeat» is refused by the compiler.
tell application id "com.adobe.inDesign"
set pagina to document offset of active page of window 1
set texto_marco_1 to text frame 1 of the active page of active window
set s to swatch "Red" of active document
set p to line 1 of paragraph -1 of texto_marco_1
end tell
Thanks
Try this. It works if there is one and only one text frame on each page.
tell application "Adobe InDesign CC 2018"
set docRef to document 1
set redColor to swatch "C=15 M=100 Y=100 K=0" of docRef
set pageCount to count of pages of docRef
repeat with i from 1 to pageCount
set thisPage to page i of docRef
tell thisPage
set bottomFrame to text frame 1
set textRef to (a reference to line -1 of bottomFrame)
set fill color of textRef to redColor
end tell
end repeat
end tell
Copy link to clipboard
Copied
Hello Camilo,
Try this, it works in CS6 for me.
tell application id "com.adobe.inDesign"
set pagina to document offset of active page of window 1
set texto_marco_1 to text frame 1 of the active page of active window
set s to swatch "Red" of active document
set p to object reference of line 1 of paragraph -1 of texto_marco_1
repeat with x in p
set fill color of x to s
end repeat
end tell
gr
Copy link to clipboard
Copied
Hi, sorry for my long reply.
I have been getting problems compiling the script.
I will try in another app.
Thanks,
Copy link to clipboard
Copied
Try this. It works if there is one and only one text frame on each page.
tell application "Adobe InDesign CC 2018"
set docRef to document 1
set redColor to swatch "C=15 M=100 Y=100 K=0" of docRef
set pageCount to count of pages of docRef
repeat with i from 1 to pageCount
set thisPage to page i of docRef
tell thisPage
set bottomFrame to text frame 1
set textRef to (a reference to line -1 of bottomFrame)
set fill color of textRef to redColor
end tell
end repeat
end tell
Copy link to clipboard
Copied
S Hopkins,
Yes, it is working on that condition: one frame por page.
Thanks for your time.
Could not find the «green» button to apply solved.
C.