Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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


Motivation:

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".

share|improve this question
    
Did you check this list? stackoverflow.com/a/4209612/353410 –  belisarius Jul 21 '12 at 23:03
    
@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? –  Szabolcs Jul 22 '12 at 10:01
    
The links to the sources are in that very post. Glad to help :) –  belisarius Jul 22 '12 at 13:59
    
New and more complete list here mathematica.stackexchange.com/a/8606/193 –  belisarius Jul 22 '12 at 15:03
add comment

1 Answer

up vote 6 down vote accepted

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]
share|improve this answer
2  
you can probably copy it here so that it's on our site (at least, the ones not already mentioned) –  rm -rf Jul 22 '12 at 14:05
    
@R.M Done. It was already linked by Chris there, I just made it self contained. –  belisarius Jul 22 '12 at 14:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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