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

Script needed to remove text wraps

New Here ,
Mar 11, 2013 Mar 11, 2013

Hi,

converted a Quark document with lots of anchored textboxes/image boxes - they all have a text wrap of 0p1. Couldn't find a script that removes all wraps globally in a document. Can anybody help?

Thanks!

TOPICS
Scripting
1.4K
Translate
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

Community Expert , Mar 12, 2013 Mar 12, 2013

Trevor, I'd suggest to set the wrap mode to None. Your script still leaves a wrap applied.

var pi = app.documents[0].allPageItems;

var l = pi.length;

while (l--) pi.textWrapPreferences.textWrapMode = TextWrapModes.NONE;

Translate
Mentor ,
Mar 11, 2013 Mar 11, 2013

Hi Tom

This should do it

var pi = app.documents[0].allPageItems;

var l = pi.length;

while (l--) pi.textWrapPreferences.textWrapOffset = [0,0,0,0]

Trevor

Translate
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 Expert ,
Mar 12, 2013 Mar 12, 2013

Trevor, I'd suggest to set the wrap mode to None. Your script still leaves a wrap applied.

var pi = app.documents[0].allPageItems;

var l = pi.length;

while (l--) pi.textWrapPreferences.textWrapMode = TextWrapModes.NONE;

Translate
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
Mentor ,
Mar 12, 2013 Mar 12, 2013

Yes, Jongware your quite right, I had thought of that but it was very late and for some compleatly wrong reason I didn't write it.

Also with TextWrapModes.NONE the values are retained and can be reapplied if desired.

Tom, you should mark Jongware's answer as correct and you can give me a helpful

Translate
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
New Here ,
Mar 12, 2013 Mar 12, 2013

Thanks for your suggestions - I'm a complete newbie in regards to scripting.

So would I copy the script into a text editor and then save it as what? (what extension).

And then put it in the apple or java script folder?

Thanks!

Translate
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
Valorous Hero ,
Mar 12, 2013 Mar 12, 2013
Translate
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
Mentor ,
Mar 12, 2013 Mar 12, 2013

First copy the script onto any plain text editor or the ESTK and save it with a .jsx extension

Then follow the instruction on Kasyans Link

Translate
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 Expert ,
Mar 14, 2013 Mar 14, 2013
LATEST

Henryk Jursz has a script on his website called qxdcleaner1.4.jsx - that cleans a whole load of stuff from an old quark conversion. His site is in Polish (Dzien Dobry, jak sie masz?) but google translate the page if need be.

Colly

If the answer wasn't in my post, perhaps it might be on my blog at colecandoo!
Translate
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