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

Applescript Text Wrap ID CS5

Community Beginner ,
Sep 25, 2012 Sep 25, 2012

Copy link to clipboard

Copied

I'm switching from CS3 to CS5 and have most things working but cannot get text wrap mode to work.

CS5, Mountain Lion

tell application "Adobe InDesign CS5"

tell document 1

tell every text frame whose label is "set_wrap"

set text wrap mode of text wrap preferences to bounding box text wrap

set text wrap offset of text wrap preferences to {9, 1, 1, 1}

end tell

end tell

I get an error -10006 Can't set text wrap mode of text wrap preferences of every text frame whose label =\"set_wrap\" to bounding box text wrap.

If I look at the text wrap preferences they look "normal" except for the text wrap mode which is displayed as «class txtw». By normal I mean understandable english so anyone can read and understand the listing. The fact that the text wrap mode is different makes me think it either can't be addressed or needs to be addressed differently. Or that it is just broken under mountain lion.

The lines referencing the text wrap preferences are taken directly from the scripting guide, and if I manually set the text frame to bounding box, the text offset does get set, so I'm addressing the frame correctly in that line at least.  What am I missing? Any help would be appreciated.

Thanks.

Tomasso

TOPICS
Scripting

Views

1.0K

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 ,
Sep 26, 2012 Sep 26, 2012

Copy link to clipboard

Copied

Hi,

ID CS5.5, OSX 10.7.4

adding a missing 'end tell' your code works 😉

Are you really, really sure that your textframelabel is correctly set¿

Try to add a count command to the list to see if it contains elements.

Your error is given if trying to set properties to no item or empty list.

Hans-Gerd Claßen

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
Community Beginner ,
Sep 26, 2012 Sep 26, 2012

Copy link to clipboard

Copied

I have checked and text frame label is set, it does let me change offsets when i address the text frame by the label. I will try setting text wrap on all text frames on the page and see if that works. I can workaround the problem by creating an object style with bounding box text wrap on and applying it. I can script creating a new object style, but i cant set text wrap mode in it via applescript either, though i seem to be able to set any other parameter. May just have to create object style on the template.

Thanks for the help, anyway.

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
Guru ,
Sep 26, 2012 Sep 26, 2012

Copy link to clipboard

Copied

LATEST

Ditto Hans, I tried here and all is fine except where NO text frames then your error…

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