2
$\begingroup$

Wishing for a permanent button super accessible for Evaluate, either Notebook or Cell. Readily clickable by Mr. Mouse. (For Windows platform, by the way.)

I note that LOTS of people have asked about this, here and elsewhere. Yet none available so far. Almost mysterious why no easily viewable and configurable toolbar comes with Mma, to add various favorites to, such as Evaluate.

Surely one of you gurus should be able to type one up for the world in less than a minute??

Any assistance greatly appreciated.

Nicholas Kormanik

$\endgroup$
2
$\begingroup$

Evaluating the following code will make a palette providing the two men operation the you are interested in and that looks pretty much like one of the simpler built-in Mathematica palettes.

CreatePalette[
  Framed @ Column[{
     Button["Evaluat Cells", 
       FrontEndExecute[FrontEndToken["EvaluateCells"]], 
         Appearance -> "Palette", ImageSize -> 120],
     Button["Evaluate Notebook", 
       FrontEndExecute[FrontEndToken["EvaluateNotebook"]], 
       Appearance -> "Palette", ImageSize -> 120]}],
  WindowTitle -> "Evaluation"];

Here is how it looks when deployed (on OS X).

palette

To install the palette, evaluate the code, select Install Palettes... from the Palettes menu, and complete the ensuing dialog box. After installation the new palette will appear in the Palettes menu. If quit Mathematica with this palette on your desktop, Mathematica will remember it and reopen it automatically the next time you launch Mathematica.

Note: You will probably get an alert asking to save the palette as a notebook, even after installation. Just ignore it -- the installation process saves the palette to the correct directory.

$\endgroup$
  • $\begingroup$ Masterfully done, @m_goldberg. Greatly appreciate your help at this. $\endgroup$ – nkormanik Mar 2 '17 at 3:43
  • $\begingroup$ Thanks for this. When I quit Mma with the palette on the desktop, though, it doesn't reopen on next launch. I'm using Mma 9. $\endgroup$ – user51827 Sep 19 '17 at 9:08
  • $\begingroup$ @ruffle Did you do the installation? Is the palette now visible in your Palette menu? $\endgroup$ – m_goldberg Sep 19 '17 at 14:32
  • $\begingroup$ @m_goldberg - Yes. $\endgroup$ – user51827 Sep 19 '17 at 20:27
  • $\begingroup$ @ruffle. Open it from the palette, then quit Mathematica. The next time you start Mathematica, the palette should be visible on the desk anytime a Notebook window is the active window. $\endgroup$ – m_goldberg Sep 19 '17 at 20:34
0
$\begingroup$

Thanks @Kuba. I wanted Mr. Mouse to handle things.

Below is my attempt, but it's not permanent. I place it as first line in a notebook for quickly evaluating examples on the Mma site. Saves going to menu, etc.

Adding this to the beginning of a notebook creates a button for Evaluating Cells which are selected....

Button["Evaluate Selected or Current Cells",
FrontEndExecute[FrontEndToken["EvaluateCells"]],
ImageSize -> {500, 30}]

Maybe someone can make it more permanent, say, by adding it to a new toolbar or palette?

$\endgroup$
  • $\begingroup$ p.s. have you tried CreatePalette or anything? $\endgroup$ – Kuba Mar 1 '17 at 10:35

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.