Sunday, November 19, 2017

#1 2010-12-13 04:10:09 pm

johnfleming
Member
Registered: 2006-04-10
Posts: 8

Illustrator text frames -- identifying whether or not text overflows

Using Applescript with Adobe Illustrator, is there a way to identify whether or not the text within a given text frame is overflowing (and thus displaying the red box with the plus sign in it), as opposed to a text frame that isn't?

Offline

 

#2 2010-12-15 08:26:54 am

TecNik
Member
From:: Applescript-Leeds-England-UK
Registered: 2003-04-02
Posts: 560
Website

Re: Illustrator text frames -- identifying whether or not text overflows

Hi there,

Had a look through the Illustrator dictionary to see if there was anything but couldn't find anything.
Then did a quick test with Illustrator and a small script to get the properties of a text box etc, but nothing.

Did think of one approach though slightly long winded.

Draw a text box maybe just off the page and name it 'overmatter_test' for example.
Loop through every text box linking it to the text box 'overmatter_test'.
Check the contents of the test box to see if it contains anything. If it does, then it's the probably the overmatter from the linked text box, therefore the linked text box must have had overmatter in it (in theory!).

You'll probably need to clear the contents of the test box before linking the next one to it.

Not had chance to code that solution, thought I'd suggest it though.

Nick

Last edited by TecNik (2010-12-15 08:28:40 am)

Offline

 

#3 2010-12-15 09:20:48 am

Mark67
Member
Registered: 2005-12-22
Posts: 780

Re: Illustrator text frames -- identifying whether or not text overflows

Nick, I think what you say is one of 2 possible solutions for Illustrator. There is now property to check. Im almost certain that 'contents' = the characters that fit within the frame. So you could resize check the string and put back… too.

Offline

 

#4 2010-12-15 04:49:28 pm

Shane Stanley
Member
From:: Australia
Registered: 2002-12-07
Posts: 5175

Re: Illustrator text frames -- identifying whether or not text overflows

You can count the number of characters of the frame, which will include overset, and compare it with the count for all the lines in the frame, which will exclude overset.


Shane Stanley <sstanley@myriad-com.com.au>
www.macosxautomation.com/applescript/apps/

Offline

 

#5 2014-09-07 11:26:55 pm

divster
Member
Registered: 2011-03-01
Posts: 112

Re: Illustrator text frames -- identifying whether or not text overflows

I know this is an old post, but Shane's method works a treat! You just have to add the number of returns to the character count line by line otherwise every frame will come up as overset.

Offline

 

#6 2017-08-28 08:49:46 am

alex52
Member
Registered: 2017-08-28
Posts: 1

Re: Illustrator text frames -- identifying whether or not text overflows

Sorry to bring this old post again but I was trying to do what you said "Sean", however I can’t manage to get the second count. I know how to get the first one using:
    set number_of_chars to count my_text


Would you be able to tell me how to get the count for all the lines in the frame? Thanks!

Edit: Found what I was needing:
     set testLength to length of lines of text frame 1 of document 1

However, does someone know how to add the number of returns to the character count line by line otherwise every frame will come up as overset. The count of characters is wrong when there are multiple lines. I need to add: (number of characters of line 1) + (number of characters of line 2) + ... etc.

Last edited by alex52 (2017-08-28 09:44:56 am)

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)