Copy link to clipboard
Copied
For example, one of my scripts is named:
Open Image in PS-【Shift+F3】.jsx
Now, using another script for setting shortcuts, I want to coompulsory assign Shift+F3 as the shortcut for the above script.
That is, the 【】 portion should function as the keyboard shortcut.
You won't have to worry about the script filename being modified.
Thank you.
Hey @dublove
Shortcuts are not accessible via Extendscript. I wish.
You are also not able to access system files, like the Shortcut file stored on your computer. This has been made on purpose by Adobe, to make it more secure.
The "only" viable way is to assign shortcuts by hand, via the Menus.
On some levels, you can trick Indesign and changing Styles shortcuts by importing/ overwritting styles from a file (which can be a script. That's what I do myself) and I've never seen anything else working. I
Copy link to clipboard
Copied
Hey @dublove
Shortcuts are not accessible via Extendscript. I wish.
You are also not able to access system files, like the Shortcut file stored on your computer. This has been made on purpose by Adobe, to make it more secure.
The "only" viable way is to assign shortcuts by hand, via the Menus.
On some levels, you can trick Indesign and changing Styles shortcuts by importing/ overwritting styles from a file (which can be a script. That's what I do myself) and I've never seen anything else working. I've read about snippets being able to do this, but I haven't never been able to make it work. Data can be imported, but not shortcuts (last time I checked)
Copy link to clipboard
Copied
@Fred.L said:
"I've read about snippets being able to do this, but I haven't never been able to make it work. Data can be imported, but not shortcuts (last time I checked)"
Hi Fred,
AFAIK, snippets' XML code can (must) be edited ( also by scripting ) to implement keyboard shortcuts for paragraph styles or character styles. Keyboard shortcuts for styles is not part of the DOM.
For "installed" script files you cannot use DOM scripting to apply keyboard shortcuts, I think.
You could invoke the menu for keyboard shortcuts, but that's it:
app.menuActions.itemByName("$ID/ShortcutsMenuItem").invoke();
Regards,
Uwe Laubender
( Adobe Community Expert )
Copy link to clipboard
Copied
I'm referring to modifying the shortcut key file using a script.
For example, my shortcut key File : "myShortcut.indk"
Find more inspiration, events, and resources on the new Adobe Community
Explore Now