[Framers] create custom keyboard shortcut - for ES script ?

Klaus Daube frame at daube.ch
Tue Jun 21 06:12:59 PDT 2016


   On 20 Jun 2016 at 9:15, Monique Semp wrote:

   > And I found his updated doc for FrameMaker 12/13,

   > http://www.daube.ch/docu/files/etb-customising-fm12.pdf, which
   explains

   > the new location for the CFG files for the different views. (I(TM)m
   not

   > quite clear on oeviews vs. oeworkspaces...)

   Monique, The descripten under heading Terminology confuses You and me
   (because it is somewhat ambigous):

     * A view groups elements of a workspace.
     * A workspace is a saved set of frequently used panels/toolbarsin a
       desired arrangement for repeated use.

   Saving a workspace also saves the current view (e.g. Author view). The
   file location of a workspace defintion  (e.g.
   %appdata%\Adobe\FrameMaker\13\WorkSpaces\UnStructured\WYSIWYGView\Autho
   ring.cfws) reveals that the workspace is saved 'below' the view
   folders... So imho the structure is somewhat screwy.

   > And when I create a customui.cfg, how do I ensure that it doesn(TM)t

   > interfere with whatever is adding the ExtendScripts and plugins to
   the

   > menu in the first place? I haven(TM)t figured out what makes these
   things

   > appear in the FrameMaker menu...

   My experiments (to be able to write that guide on customisation) show
   that after the intitialision as lined out on page 18 of the
   customisation guide, next steps are:

   - intitialise the API clients (e.g. FrameScript, ExtendScript,
   dll-plugins)

   - run the automatically started scripts (for ExtendScript they are
   located in %appdata%\Adobe\FrameMaker\13\Startup)

   All of these can add/remove menu-items and/or keyboard shortcuts.

   [If Klaus Müller or another expert reads this and disagrees, please let
   me know to write it down - I have not found real information on this
   subject]

   > I(TM)m sure that this is very easy to do, and the examples in Klaus

   > Daube(TM)s doc support that. But the hard part is figuring out just
   which

   > files to revise and/or copy-and-adapt!

   Theoretically an ExtendScript can define it's own keyboard shortcuts -
   but this mechanism does not work at all (see end of line 04 hereafter)

   01 // --- Menu definition for documents

   02 var menuLocation = app.GetNamedMenu("FormatMenu");

   03 var FMcalcMenu  = menuLocation.DefineAndAddMenu("!FMcalcMain",
   oMenus.MenuMain);

   04 FMcalcMenu.DefineAndAddCommand(1,"docFMcalcDocu", oMenus.MenuDocu,
   "\!qd");

   So the only method would be to define a shortcut to an ES script via
   the cfg file - but this does not work either: at the time of analysing
   the cfg file the command referring to the script is not known (see
   sequence of intitialisation)... So there is knot in the system.

   [I repeat here my caveat: Any experts are welcome to correct my view -
   because I feel uncertain about this subject]

   Monique, I hope not to have confused You further...

   Klaus Daube

   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   ~~

   Klaus Daube             Phone:  +41-44-381 37 77

   Schäracher 11           Mail:   klaus at daube.ch

   CH-8053 Zürich          Web:    www.daube.ch

   --

   ~!


More information about the Framers mailing list