-
1. Re: Adjust tracking (character spacing) of selected text
pixxxel schubser Aug 21, 2014 1:48 PM (in response to kevinljohnston)For InDesign?
Why you need a script? This is always built in and works with selected text!
InDesign Help | Default keyboard shortcuts
Have fun
-
2. Re: Adjust tracking (character spacing) of selected text
[Jongware] Aug 21, 2014 3:48 PM (in response to kevinljohnston)Your sample does indeed not look like it's using InDesign's version of the DOM (Document Object Model). Fortunately, if you already selected some text, it's dead easy:
app.selection[0].tracking = 100;
where you can set the "100" to any value that is valid for tracking. For added nicenessness, if you really have to set this value a lot, assign a hotkey to this script: open the Keyboard Shortcut Editor, scroll down to Scripts, and select yours, then set some key combo.
See Adobe InDesign CS5.5 (7.5) Object Model JS: Text for tracking, and a lot more properties you can immediately assign.
-
3. Re: Adjust tracking (character spacing) of selected text
kevinljohnston Aug 22, 2014 11:21 AM (in response to kevinljohnston)Thanks to both Plxxxel and Jongware!
Both of your answers were helpful - I have combined use of both.
Plxxxel - I was aware there was a shortcut (Alt+Left Arrow, Alt+Right Arrow) for incrementing tracking by the amount set in Edit, Preferences, Units & Increments, Kerning & Tracking. What I didn't realize was that Ctrl+Alt+Right Arrow, Ctrl+Alt+Left Arrow increments/decrements that setting by 5 times. So, for my usage, I have set Tracking at 1. Then I use the Crtl+Alt arrow combinations for rougher (5 incr.) spacing and Alt arrow combinations for fine (1 incr.) tuning. That actually is the practical solution for me.
Jongware - Thanks for your scripting solution! Your answer was correct according to what I asked in my original question.
I found it can be more useful if I adapt it to increment additional tracking amounts:
/*
<javascriptresource>
<name>Character Tracking. Increase</name>
<enableinfo>true</enableinfo>
<menu>automate</menu>
<about>Adjust the kerning.</about>
<category>Typography</category>
</javascriptresource>
*/
app.selection[0].tracking = app.selection[0].tracking + 10;
[Similar script for Character Tracking.Decrease.]
So assigning these scripts to keyboard shortcuts like Alt+1, Q, I have:
Alt + arrow = increment by 1
Ctrl+Alt + arrow = increment by 5
Alt 1/Q = increment by 10
Actually, my needs are sufficiently met by just using the built-in Alt and Ctrl+Alt arrow combinations, but thought I would document the simple script alternative in case anyone could make use of it.
I think I have graduated to becoming an amateur.
Thanks again to both of you for your help!
-
4. Re: Adjust tracking (character spacing) of selected text
pixxxel schubser Aug 22, 2014 12:32 PM (in response to kevinljohnston)Hi kevinljohnston,
glad to help you.
And I'm with you. Using both answers is a good practice.
Have fun
@all admins, why isn't there no possibility to mark any answers as helpful. IMHO it is always a hard decision to say which answer is really correct. That was much better before the Jive update!