Copy link to clipboard
Copied
Is it possible to write scripts that emulate a key combination?
As an exmaple, could you write a script that exectues "shift+right key" combination on the keyboard so if a word is highlighted, it would add an extra highlighted character to the word when activating the script.
Sometimes I feel like it would be easier if I just had my indesign scripts panel open and double clicking on a script instead of doing a shortcut key combination. Thanks!
Copy link to clipboard
Copied
You can have your Scripts panel open - Window>Utilities>Scripts
And dock the script panel with your other panels.
I have mine docked to the left beside the Tools.
You can then Save your workspace.
https://helpx.adobe.com/indesign/using/workspace-basics.html
Copy link to clipboard
Copied
You can apply key commands to your scripts via Edit>Keyboard Shortcuts>Product Area>Scripts, or simply leave your Scripts panel open.
Copy link to clipboard
Copied
As an exmaple, could you write a script that exectues "shift+right key" combination on the keyboard
Re-read your post, are you looking for a script that will add a character to the text selection so you can avoid the key command? It is scriptable, something like this:
var a = 1;
try {
var s = app.documents[0].selection[0];
app.documents[0].select(s.parent.characters.itemByRange(s.characters[0].index, s.characters[s.length-1].index+a));
}catch(e) {};
Copy link to clipboard
Copied
Yeah, that was just one example. I was hoping it would be possible so I could edit the script to do any number of key combinations, without having to know how to write javascript. I knew it probably wasn't possible unfortuantely. Thank you very much for that script though. I will definitely be using it a lot. For some reason if you highlight a word that has a period at the end, it doesnt highlight the period as well, so this script will come in handy for that.
Copy link to clipboard
Copied
Not a direct solution, but I've worn out three Logitech macro keyboards in the last few years. Being able to automate actions way out at the user interface solves/enables a lot of things that even sophisticated scripting can't.
Copy link to clipboard
Copied
Yeah I bought a Motospeed numpad that I use for exactly that. Unfortunately I've already assigned shortcuts/scripts to all the keys on that now. Maybe it's time to buy a second one.
Copy link to clipboard
Copied
AutoHotKey
Send,^+r ;it will send ctrl+shift +r in any program you want
Copy link to clipboard
Copied
There are a few ways that I can use to activate my scripts:
I've written some of these tips in more description over here: https://colecandoo.com/2020/08/02/small-tips-to-save-big-time/
Copy link to clipboard
Copied
Cool article (small tips...) 🙂
that's exactly how I think about work. Too bad you're a Mac user :), AutoHotKey is an incredible thing. for example radial menu:
Copy link to clipboard
Copied
Just stumbled onto this github that carries on from my fourth point in my post: https://github.com/grefel/addScriptFolderToMenu/ - it's in German but view it through Chrome with translation on, should be fine.