How can I programmatically open a palette from the Palettes menu? Is there a Front End token for this?


Certain settings for the palettes that are installed into standard locations and show up in the Palettes menu are stored in the "PalettesMenuSettings" global option (accessible through the Option Inspector or CurrentValue[$FrontEnd, "PalettesMenuSettings"]). These settings become active only if the palette is opened through the Palettes menu. If the palette notebook is opened directly (through the operating system's file manager or File -> Open...), then these settings do not take effect.

Use case:

I need to re-open the image uploader palette after it has updated itself. The upload history is stored in the "PalettesMenuSettings".

  • $\begingroup$ Did you check this list? stackoverflow.com/a/4209612/353410 $\endgroup$ – Dr. belisarius Jul 21 '12 at 23:03
  • $\begingroup$ @belisarius Thanks! Where on earth did you find that list? It's extremely useful! Can you post an answer saying that FrontEndToeknExecute["OpenFromPalettesMenu", notebookFileName] will do it? $\endgroup$ – Szabolcs Jul 22 '12 at 10:01
  • $\begingroup$ The links to the sources are in that very post. Glad to help :) $\endgroup$ – Dr. belisarius Jul 22 '12 at 13:59
  • $\begingroup$ New and more complete list here mathematica.stackexchange.com/a/8606/193 $\endgroup$ – Dr. belisarius Jul 22 '12 at 15:03

In this answer I posted a large stock of undocumented FE tokens.

Per your comment under the question, the required token is in that list:

FrontEndTokenExecute["OpenFromPalettesMenu", notebookFileName]
  • 2
    $\begingroup$ you can probably copy it here so that it's on our site (at least, the ones not already mentioned) $\endgroup$ – rm -rf Jul 22 '12 at 14:05
  • $\begingroup$ @R.M Done. It was already linked by Chris there, I just made it self contained. $\endgroup$ – Dr. belisarius Jul 22 '12 at 14:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.