Highlighted

Script: Adjust tracking (character spacing) of text

LEGEND ,
Oct 15, 2011

Copy link to clipboard

Copied

PSE doesn't show the user all the text formatting capabilities available in PhotoShop, but this script can alter the tracking (character spacing) of the text on a layer.

Here are the steps to use the script:

  1. Open Notepad.
  2. Copy this text and paste it into Notepad:

    /*
    <javascriptresource>
    <name>Character Tracking</name>
    <enableinfo>true</enableinfo>
    <menu>automate</menu>
    <about>Adjust the kerning.</about>
    <category>Typography</category>
    </javascriptresource>
    */

var targettext = app.activeDocument.activeLayer.textItem
targettext.tracking = 30

 

  1. Use "Save As" with the File Type of "All Files" to save it as
    Character tracking.jsx
    in the
    C:\Program Files (x86)\Adobe\Photoshop Elements 10\Presets\Scripts
    directory.
  2. Keep the .JSX file open in Notepad.
  3. Start PSE.  You'll have a new menu item:  File...Automation Tools...Character Tracking.
  4. Create a document in PSE with some text on a text layer.
  5. With a text layer selected, run the Character Tracking script.
  6. To adjust the tracking, simply switch to Notepad and change the numeric value after the equals sign, save the file and re-run it in PSE.  (No need to close and re-open PSE.)

You can use negative values, too -- any number between -1000 and 10000 is OK.

For example, here's the original:

character tracking original.png

Here the tracking was set to -50:
character tracking m50.png

And here the value was 300:
character tracking p300.png

It works on paragraph text as well.

Enjoy!

Ken

Views

19.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

Script: Adjust tracking (character spacing) of text

LEGEND ,
Oct 15, 2011

Copy link to clipboard

Copied

PSE doesn't show the user all the text formatting capabilities available in PhotoShop, but this script can alter the tracking (character spacing) of the text on a layer.

Here are the steps to use the script:

  1. Open Notepad.
  2. Copy this text and paste it into Notepad:

    /*
    <javascriptresource>
    <name>Character Tracking</name>
    <enableinfo>true</enableinfo>
    <menu>automate</menu>
    <about>Adjust the kerning.</about>
    <category>Typography</category>
    </javascriptresource>
    */

var targettext = app.activeDocument.activeLayer.textItem
targettext.tracking = 30

 

  1. Use "Save As" with the File Type of "All Files" to save it as
    Character tracking.jsx
    in the
    C:\Program Files (x86)\Adobe\Photoshop Elements 10\Presets\Scripts
    directory.
  2. Keep the .JSX file open in Notepad.
  3. Start PSE.  You'll have a new menu item:  File...Automation Tools...Character Tracking.
  4. Create a document in PSE with some text on a text layer.
  5. With a text layer selected, run the Character Tracking script.
  6. To adjust the tracking, simply switch to Notepad and change the numeric value after the equals sign, save the file and re-run it in PSE.  (No need to close and re-open PSE.)

You can use negative values, too -- any number between -1000 and 10000 is OK.

For example, here's the original:

character tracking original.png

Here the tracking was set to -50:
character tracking m50.png

And here the value was 300:
character tracking p300.png

It works on paragraph text as well.

Enjoy!

Ken

Views

19.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
Oct 15, 2011 1
New Here ,
Feb 28, 2013

Copy link to clipboard

Copied

I've made a slight adjustment to this script. Instead of changing the file every time it will display a prompt where you enter the tracking value.

/*

<javascriptresource>

<name>Character Tracking...</name>

<enableinfo>true</enableinfo>

<menu>automate</menu>

<about>Adjust the kerning.</about>

<category>Typography</category>

</javascriptresource>

*/

if (app.documents.length > 0) {

    var targettext = app.activeDocument.activeLayer.textItem;

    targettext.tracking = parseInt(prompt("Select the tracking value", 0));

}

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 28, 2013 0
New Here ,
May 18, 2013

Copy link to clipboard

Copied

I've tried this on my mac with Elements 11. It works if you run the script through a piece of external scripting software, but not from the menus in Elements.

As soon as the text is selected, the menu option is greyed out to access the Character Tracking script. Any idea how to change the behaviour or script to be accepted in Elements on the Mac?

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 18, 2013 0
New Here ,
Jul 19, 2013

Copy link to clipboard

Copied

I've also tried this on my Mac with Elements 11, saving the script from TextEdit, then opening the PSE package in the Applications folder with "Show package contents" and copying it in the folder as mentioned above. However when I run the script from within PSE, I get the following message:

Error 8: Syntax error.

Line: 1

->  {\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf390

Does anybody know what this means and how to fix it?

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...
Jul 19, 2013 0
New Here ,
Jul 20, 2013

Copy link to clipboard

Copied

By default TextEdit saves files as "rich text" (so it can support things like bold and italic. That causes Elements to get confused. To fix this, open TextEdit, then choose Format -> Make Plain Text. Now copy and paste in the script above and save the file.

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...
Jul 20, 2013 0
New Here ,
Aug 08, 2013

Copy link to clipboard

Copied

Wonderful, works perfectly! Thanks!

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...
Aug 08, 2013 0
New Here ,
Oct 22, 2013

Copy link to clipboard

Copied

are these MAC or PC instructions.

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...
Oct 22, 2013 0
LEGEND ,
Oct 22, 2013

Copy link to clipboard

Copied

Read the whole thred, Victor. Post #3 from Bittergal explains how to adapt it for macs.

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...
Oct 22, 2013 0
New Here ,
Oct 22, 2013

Copy link to clipboard

Copied

when I get my degree in computer science I'll understand all this.

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...
Oct 22, 2013 0
New Here ,
Dec 12, 2013

Copy link to clipboard

Copied

In case this is helpful to anyone.... Similar to the Mac user, (although I am using a Windows PC) I too do not seem to have the option to select this new Character Tracking script in the Automation Tools list when I select & "highlight the actual words" in a Text Layer that I wished to "track". If you are having trouble you can tell if you have done this incorrectly if you look on the left PSE side-menu and you see that you are actively using PSE's Horizontal Type Tool.

The remedy for me was simply to use PSE's Move Tool, then click once to select the text layer field (as if to move it)-  now the Character Tracking script functionality under the Automation Tools menu was available for me to use.  

Oh and a big THANKS to the programmers of the script!

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...
Dec 12, 2013 0
New Here ,
Jun 19, 2014

Copy link to clipboard

Copied

Automation tools is greyed out to me

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...
Jun 19, 2014 0
New Here ,
Nov 05, 2014

Copy link to clipboard

Copied

I'm new to the iMac world . . . as of last week.  Anyways, I went to work on a Christmas card for a client and the type is all spaced out!

I've read through this . . . but, to be perfectly honest I have NO IDEA what it's saying . .. is there anyone who could give me the PSE for DUMMIES version on this issue?
I'm working with PSE 13

Thanks!!!!

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...
Nov 05, 2014 0
New Here ,
Feb 25, 2015

Copy link to clipboard

Copied

Works great! Thanks so much for the script and instructions.

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 25, 2015 0