Specifying Shortcut in ExtendScript
Hiya,
I have a script I'm designing to automatically apply certain preferences (page size, orientation, etc) to meet in-house styling requirements. For each paragraph style, I have a function to add the paragraph style with the preferred font, font style, point size, etc. For example, here's part of one of the functions:
//add table text paragraph style
function addTableTextPS(){
tableTextPS = myDocument.paragraphStyles.add({name: "table text"});
//font style
tableTextPS.appliedFont = "Arial";
tableTextPS.fontStyle = "Regular";
tableTextPS.pointSize = 9;
tableTextPS.leading = 10.5;
//and so on...
}
The last thing I'm missing, which is actually one of the most critical features, is the shortcut definition for each of the paragraph styles - without setting the shortcuts, sadly, the script will be useless. As far as I'm aware, the paragraphStyle object does not have a property that allows setting the shortcut. Is there a way to set the shortcut from script?
Many Thanks,
Bo
(PS. I'm using Indesign 2025 20.3)
