How to trigger options in panels in Adobe CC apps?

Hi,
I want to create a keyboard shortcut in Indesign to select the '[none]' option in the character style panel.
Is that possible without resorting to something like 'click on absolute screen coordinates'?
TIA,
Willem van den Goorbergh

I use this (change the path to your Desktop in the AppleScript) on a palette in InDesign (but you could assign a different hot key):

Keyboard Maestro 8.2.4 “90)Zap Character Styles” Macro

90)Zap Character Styles.kmmacros (4.8 KB)

More on this topic (including the script I use) here, BTW.

Ah,
That's a great tip.
Thanks mrpasini!

I recommend always using the tilde ~ character as a placeholder for the user's home folder in both KM and scripts, and the set all paths as POSIX paths.

If need be, you can easily convert to HFS path.


use AppleScript version "2.5" -- El Capitan (10.11) or later
use framework "Foundation"
use scripting additions

set myPath to "~/Documents"
set myPath to my expandPath(myPath)
set myPathHFS to POSIX file myPath as text

--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
on expandPath(pPosixPath) -- @Path @Posix @ASObjC
  (*  VER: 2.0    2017-03-02
---------------------------------------------------------------------------------
  PURPOSE:  Expand Tilde in Path to return full Path
  PARAMETERS:
    • pPOSIXPath    | text  | Path that may contain tilde (~)
  RETURNS:  text ∣ Full Path
  AUTHOR:  JMichaelTX
  REF:
    1. Based on script from @ccstone (Chris Stone)

—————————————————————————————————————————————————————————————————————————————————
*)
  ## Requires:  use framework "Foundation"
  
  set fullPath to (current application's NSString's stringWithString:pPosixPath)'s stringByExpandingTildeInPath
  return fullPath as text
  
end expandPath
--~~~~~~~~~~~~~~~ END OF handler expandPath ~~~~~~~~~~~~~~~~~~~~~~~~~