-
1. Re: JS CS3 How to apply wrap options to selected textframes
Marijan Tompa Aug 11, 2010 12:15 AM (in response to John.Kordas)Hey!
Maybe you can group frames and then set wrap to group like this:
var mySel = app.selection; var myGroup = app.activeDocument.groups.add(mySel); myGroup.textWrapPreferences.textWrapType = TextWrapTypes.NONE;
--
tomaxxi
-
2. Re: JS CS3 How to apply wrap options to selected textframes
John.Kordas Aug 11, 2010 5:16 AM (in response to Marijan Tompa)Thanks tomaxxi,
That did seem to work. What I found after a couple of tests is that I need to apply the Ignore Text Wrap under the Text Frame options window to the selected text frames. I can do it via the UI but when I look up the Object Model for the selection option there does not seem to be a way to access the Ignore Text Wrap. Can this be done?
-
3. Re: JS CS3 How to apply wrap options to selected textframes
Marijan Tompa Aug 11, 2010 5:27 AM (in response to John.Kordas)Yeah!
If you want to apply this to previously created group you can do this:
myGroup.textFramePreferences.ignoreWrap = true;
--
tomaxxi
-
4. Re: JS CS3 How to apply wrap options to selected textframes
John.Kordas Aug 11, 2010 6:08 AM (in response to Marijan Tompa)Thanks again tomaxxi,
For some reason I keep getting an error Object does not support the property or method textFramePrefernces
Code:
var mySel = app.selection;
var myGroup = app.activeDocument.groups.add(mySel);
myGroup.textFramePreferences.ignoreWrap = true;
myGroup.textWrapPreferences.textWrapType = TextWrapTypes.NONE;If I put $.write(myGroup) just after the var myGroup I get [object Group] and
$.write(myGroup.constructor.name) returns Group.
Also tried this but error undefined is not an object. [ mySel.textFramePreferences.ignoreWrap = true; ]
var mySel = app.selection;
mySel.textFramePreferences.ignoreWrap = true;
var myGroup = app.activeDocument.groups.add(mySel);
myGroup.textWrapPreferences.textWrapType = TextWrapTypes.NONE;But $.write(mySel) returned [too many elements] and $.write(mySel.constructor.name) returned Array.
Cheers, John.
-
5. Re: JS CS3 How to apply wrap options to selected textframes
Marijan Tompa Aug 11, 2010 6:38 AM (in response to John.Kordas)Yeah, you are right...
You can't asign textFramePrefernces to group of objects. It's my fault.
I think you'll have to loop through objects...
--
tomaxxi



