• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Help to remanufacture this script.

Participant ,
Aug 02, 2018 Aug 02, 2018

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

TOPICS
Scripting

Views

669

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , Aug 07, 2018 Aug 07, 2018

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

Votes

Translate

Translate
Contributor ,
Aug 03, 2018 Aug 03, 2018

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 07, 2018 Aug 07, 2018

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,rockie probl.jpg

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Aug 07, 2018 Aug 07, 2018

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 08, 2018 Aug 08, 2018

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines