|
Applying Styles
One real annoying thing about InDesign is when making a keyboard shortcut for paragraph/character styles you have to use the number keypad. What’s more you can’t give the “None” style a keyboard shortcut. The good news is with this one line script you have any easy fix. This one is for character styles. Just replace MyCStyle with the exact name of your character style. For the [None] character style replace MyCStyle with [None]:
try {app.selection[0].appliedCharacterStyle = app.activeDocument.characterStyles.item("MyCStyle")}catch (e) {exit()};
Copy/paste it into a text editor and save it with a .jsx extension in your InDesign>Presets>Scripts folder, then in InDesign go to Window>Automation>Scripts and double click the file name to run the script.
Now all you have to do is go to Edit>Keyboard Shortcuts… and in the Product Area dropdown choose Scripts and select the name of your script and you can give any keyboard shortcut you’d like.
This one is for paragraph styles. Once again replace MyPStyle with the exact name of your paragraph style. For the [No Paragraph Style], replace MyPStyle with No Paragraph Style.
try {app.selection[0].appliedParagraphStyle = app.activeDocument.paragraphStyles.item("MyPStyle")}catch (e) {exit()};
For InDesign CS2 users: Copy/paste it into a text editor and save it with a .jsx extension in your InDesign>Presets>Scripts folder, then in InDesign go to Window>Automation>Scripts and double click the file name to run the script.
For InDesign CS3 users: Copy/paste it into a text editor and save it with a .jsx extension in your InDesign>Scripts>Scripts Panel folder, then in InDesign go to Window>Automation>Scripts and double click the file name to run the script. |
|
Scripts |
|
Tips |

|
InDesign Tips Tips on how to get the most out of Adobe InDesign |
|
Contact |