I use Adobe Indesign to design newspaper pages. Many menu items tunnel into submenus and from there into panels. Is there any way to get a macro to select a menu item from a panel? I've tried the Select Menu item option but the panel menu items don't appear. I'm very much a newbie to KM, but I can't find anything that would apply to this. Is there another utility that would work better.
Hi @graphicsgeezer
I use Adobe Illustrator daily and InDesign (not so much) and have managed to get Keyboard Maestro to speed up a lot of this stuff. As InDesign and Illustrator are both by Adobe I suspect a lot of the Palette Stuff is similar and equally fiddly to access and automate. But I have been successful in most of the things I have tried - so, I am sure there will be ways Keyboard Maestro can speed up your workflow.
Could you give an exact example of one task you would like to automate (the Palette, Sub-Menu etc that you can't access)?
I am assuming you mean something like this (a sub menu of the Color Palette in InDesign):
The first stop is find out if any of this stuff can be accessed by obscure keyboard shortcuts and then use Keyboard Maestro to press those shortcuts for you. A search on Google will find lists of these shortcuts.
A second Approach is to see if you can make an Action in InDesign (in effect an InDesign Macro) and invoke this Action using Keyboard Maestro (this has worked very well for me with Illustrator).
A third approach is to do a Google Search for any AppleScripts that might do what you want and again use Keyboard Maestro to invoke them.
And, if all else fails, you can use Keyboard Maestro's ability to click on a Found Image to bring up the Dropdown Menu from the palette and then get Keyboard Maestro to type the name of the menu item you want. Basically automating your mouse movements and clicks.
Thanks for your help-- I'll definitely try your ideas out. But you've more or less told me that KM won't select such menu items directly without recording mouse movements, which won't work because panels change positions from time to time. Is there anything out there that would work better?
That is where "Click at Found Image" comes into play. The Macro can be set to move the mouse to the palette and click at the spot to reveal the sub menu. You need to make sure the image chosen to click at is unique to that palette (as many palettes will look the same). So, something like this:
I second @zabodon's reply: Click At Found Image is not recording mouse coordinates; it's looking for an image onscreen--in this case, InDesign's panel flyout menu--and then clicking on that, wherever it happens to be. I've used Keyboard Maestro for several years now to automate InDesign, InCopy, Illustrator, Photoshop, Acrobat, and other applications through Click At Found Image.
To get you started, here is a breakdown of a Macro I use in Adobe Illustrator to toggle Scale Strokes and Effects on and off (there is no built in shortcut for this and I have to do it all the time). It might give an idea of how to build your own Macros using Keyboard Maestro's extremely flexible modular syststem of just stringing Actions together until you get something that works.
First the whole Macro (and then notes on what each Action does and why it is there):
This first Action opens the Palette I want. (As Illustrator has the same Menu Command to open and close the Palette I have had to add a condition that the Menu Item is Marked (has a tick next to it) otherwise this Action would close the Palette if it was already open). This is actually the most fiddly bit in the whole macro - after this step it gets much simpler.
The next Action moves and clicks the Mouse where it needs to on the Palette (The image is an area Screengrab of the top of the Palette just pasted into Keyboard Maestro's Image Well). The coordinates 110 and 0 I found by experimenting.
One other thing to be aware of when building these Macros is that sometimes it can help to have a tiny pause between Actions to give the System time to catch up with each Action. In the above example I found it works without any pauses - but that would be my first debug if it stopped working as expected.
I didn't know about the Is Marked condition. Your Illustrator example just solved an annoying frustration I have with an Adobe Audition macro. Thank you!
This is a very helpful discussion. I'm too much of a newbie to be able to follow your instructions exactly, but I found a good elementary tutorial here: Keyboard Maestro 202: Mouse Clicks - YouTube
Then you just have to invoke them in Javascript (through Applescript otherwise it doesn't work directly with Keyboard Mestro) like this for example:
tell application id "com.adobe.InDesign"
do script "app.menuActions.itemByID(27139).invoke();" language javascript
end tell
or another method (by name):
tell application id "com.adobe.InDesign"
do script "try {app.menuActions.item("Convert to Grayscale").invoke(); } catch(e) {};" language javascript
end tell