As an example, trigger an Illustrator script using a keyboard shortcut. Credit to Joonas.
-
Open Automator
-
Create a new Service
-
At the top
Service receives [no input] in [Adobe Illustrator]
If you specify
[any application]
, you can launch the script when any window is active