Spiral "Shrinking" Text Script

New Here ,
May 07, 2017

Copy link to clipboard

Copied

Good day all,

Reaching out to experts to see if anyone can assist to update this script to work with new CC Illustrator.

This is an older script which i came across years ago,

ChangeSizesOfTextSelection.js

and made the 2 small changes suggested by Larry G. Schneider

if (pageItemType == "TextArtItem")

change to

if (pageItemType == "TextFrame")

and

theTextRange = pageObject.textRange();

change to

theTextRange = pageObject.textRange;

Yet this will not function properly on CC2014 as I get an error every time i try to run this.

I love the effects of this and seeing if someone can help update or fix so this works on newer versions. Below is link to original post.

THANKS MUCH in advance for anyone that can help.

Views

1.6K

Likes

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

Spiral "Shrinking" Text Script

New Here ,
May 07, 2017

Copy link to clipboard

Copied

Good day all,

Reaching out to experts to see if anyone can assist to update this script to work with new CC Illustrator.

This is an older script which i came across years ago,

ChangeSizesOfTextSelection.js

and made the 2 small changes suggested by Larry G. Schneider

if (pageItemType == "TextArtItem")

change to

if (pageItemType == "TextFrame")

and

theTextRange = pageObject.textRange();

change to

theTextRange = pageObject.textRange;

Yet this will not function properly on CC2014 as I get an error every time i try to run this.

I love the effects of this and seeing if someone can help update or fix so this works on newer versions. Below is link to original post.

THANKS MUCH in advance for anyone that can help.

Views

1.6K

Likes

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
May 07, 2017 0
Adobe Community Professional ,
May 07, 2017

Copy link to clipboard

Copied

I remember that script from way back. Try this:

  1. // CharSizeChangeFromFirst2LastInProportion.jsx 
  2.  
  3. // http://forums.adobe.com/thread/1414597?tstart=0 
  4.  
  5. // select a text frame or pathtext before running this script  
  6. // test this script at first with only a few characters! 
  7. // The more letters, the longer it takes 
  8.  
  9. // If the screen seems to be frozen - please wait for a while 
  10.  
  11. // regards pixxxelschubser  25/Febr./2014 
  12.  
  13. var aDoc = app.activeDocument; 
  14. if (aDoc.selection.length > 0) { 
  15.     if (aDoc.selection.length < 2 && aDoc.selection[0].typename == "TextFrame") { 
  16.         var aTFrame = aDoc.selection[0]; 
  17.         var theChars = aTFrame.characters; 
  18.         var charLength = theChars.length; 
  19.         var startSize = prompt("size of first character", 25,"start size"); 
  20.         var endSize = prompt("size of last character", 5,"end size"); 
  21.         var step = (startSize-endSize)/(charLength-1); 
  22.         for (i = 0; i < charLength; i++) { 
  23.             theChars.size = (startSize - i*step).toFixed (2); 
  24.             redraw(); 
  25.             } 
  26.         } else {alert("Please select only one text frame")} 
  27.     } else {alert("No selection")}

Likes

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
Reply
Loading...
May 07, 2017 1
Adobe Community Professional ,
May 09, 2017

Copy link to clipboard

Copied

John Wundes' TextTweaker script can do that and many other things: wundes.com

Likes

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
Reply
Loading...
May 09, 2017 1
Adobe Employee ,
May 09, 2017

Copy link to clipboard

Copied

Hi razo.ad1985,

I believe the suggestions above are great and it should get your desired output. In case you need further assistance, I would suggest you to check Illustrator Scripting​ forum as well for dedicated Scripting support.

Regards,

Om

Likes

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
Reply
Loading...
May 09, 2017 0
Engaged ,
May 10, 2017

Copy link to clipboard

Copied

https://forums.adobe.com/thread/1414597?tstart=0

razo.ad1985 reply #2

“i borrowed second image from online as looked similar to what i am trying to achieve....”

I did that Illustrator file over 10 years ago and posted on another forum.

I just tested my script. Still works. (YIPPEE)

• macOS Sierra (version 10.12.4)

• Illustrator CC 2017 (version 21.1.0)

As I recall from long ago, I modified a script that came shipped with maybe CS2.

I made a new script, SizeTextOneDirection.js

I am NOT a scripting person!

I opened the script using Text Edit app.

Here is the text for SizeTextOneDirection.js

selection = app.activeDocument.selection;

for(i=0, scale=100.0; i< selection.characters.length; i++, scale *= 0.99) {

selection.characters.characterAttributes.horizontalScale = scale;

selection.characters.characterAttributes.verticalScale = scale; }.

Here is my sample file created with Illustrator CC 2017 (version 21.1.0)

Set your text.

With the Text Tool, select all your text, run the script SizeTextOneDirection.js

Copy your text, Paste on a path. (Text on a Path)

Hope that helps.

Kkb_SizeText on Spiral.png

Likes

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
Reply
Loading...
May 10, 2017 0
Community Beginner ,
Feb 19, 2020

Copy link to clipboard

Copied

Thank you, but is this the full code?
I think no. Does't works for me.
Please write the full text.

Likes

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
Reply
Loading...
Feb 19, 2020 0
New Here ,
Jan 12, 2021

Copy link to clipboard

Copied

  1. // CharSizeChangeFromFirst2LastInProportion.jsx 
  2.  
  3. // http://forums.adobe.com/thread/1414597?tstart=0 
  4.  
  5. // select a text frame or pathtext before running this script  
  6. // test this script at first with only a few characters! 
  7. // The more letters, the longer it takes 
  8.  
  9. // If the screen seems to be frozen - please wait for a while 
  10.  
  11. // regards pixxxelschubser  25/Febr./2014 
  12.  
  13. var aDoc = app.activeDocument; 
  14. if (aDoc.selection.length > 0) { 
  15.     if (aDoc.selection.length < 2 && aDoc.selection[0].typename == "TextFrame") { 
  16.         var aTFrame = aDoc.selection[0]; 
  17.         var theChars = aTFrame.characters; 
  18.         var charLength = theChars.length; 
  19.         var startSize = prompt("size of first character"25,"start size"); 
  20.         var endSize = prompt("size of last character"5,"end size"); 
  21.         var step = (startSize-endSize)/(charLength-1); 
  22.         for (i = 0; i < charLength; i++) { 
  23.             theChars[i].size = (startSize - i*step).toFixed (2); 
  24.             redraw(); 
  25.             } 
  26.         } else {alert("Please select only one text frame")} 
  27.     } else {alert("No selection")}

Likes

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
Reply
Loading...
Jan 12, 2021 0
Resources