Source code for ButtonTools

June 9th 2002

ButtonTools 3.0.2, Rolf Mertig,  (Mertig Consulting)

Selecting this notebook and clicking on the HP button of the ButtonTools palette will create a horizontal palette. 
You can eliminate or add your own buttons and create your custom palette. Each button is created by clicking inside its code (inside the section cell) and clicking the F2B button.

Tools for manipulating Notebooks and the Front End

This version should be  used with  Mathematica 4.0 and newer, though some buttons will also work in 3.0

Help

NotebookPut@Notebook[{

Cell[CellGroupData[{
Cell[TextData[{
  "ButtonTools 3.0.2 ",
  ButtonBox[" Mertig Consulting",
    ButtonData:>{
      URL[ "http://www.mertig.com"], None},
    ButtonStyle->"Hyperlink"]
}], "Title"],

Cell[CellGroupData[{

Cell["Tools for manipulating Notebooks and the Front End", "Section 1"],

Cell[TextData[{
  "Working with the ",
  StyleBox["Mathematica",
    FontSlant->"Italic"],
  " FrontEnd one often needs certain actions which are not readily available. \
Over the years I programmed some buttons which I found useful. All of this \
code may be modified, copied, etc. . Let me know if you have a nicer design \
on how to label the buttons (or use icons) and how to color them."
}], "Text"],

Cell[TextData[{
  "This version should be used with ",
  StyleBox["Mathematica",
    FontSlant->"Italic"],
  " 4.0 or higher, though some buttons will also work in 3.0.\nIf you want to \
use the JURL button, get JLink 2.0 ."
}], "Text"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Legal notice and Credits", "Section 1"],

Cell["\<\
For the moment all Butons of ButtonTools are free software. You may use and \
redistribute, but not sell it.
If you find any problems you may write me an email but I may ignore you \
(unless you pay for my time ☺).\
\>", "Text"],

Cell["\<\
   THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS \"AS IS\" AND
   ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
   FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
   OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
   HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
   LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
   OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   SUCH DAMAGE.
\
\>", "Text"],

Cell[TextData[{
  "Credits: \n\nJURL is based on the NotebookOpenURL and the GetURL function \
from J/Link as described in section 1.3.3 of the J/Link manual by Todd Gayley \
to be found at ",
  ButtonBox["http://www.wolfram.com/solutions/mathlink/jlink",
    ButtonData:>{
      URL[ "http://www.wolfram.com/solutions/mathlink/jlink"], None},
    ButtonStyle->"Hyperlink"],
  ".\n\nThe FrontEnd dialog in BRP is based on a program by John Novak."
}], "Commentary"]
}, Closed]],

Cell[CellGroupData[{

Cell["June 9th 2002, Rolf Mertig", "Section 1"],

Cell["Changes: Modified JURL. Added evaluation buttons.", "Text"],

Cell[TextData[{
  "These buttons were developed over the last year for working quicker with \
the ",
  StyleBox["Mathematica",
    FontSlant->"Italic"],
  " front end and for producing buttons with functional (side) effects quick \
and easy.\nWhile most buttons do work in ",
  StyleBox["Mathematica",
    FontSlant->"Italic"],
  " 3.0 it is advised (at least on X) to use ",
  StyleBox["Mathematica",
    FontSlant->"Italic"],
  " 4."
}], "Text"],

Cell[TextData[{
  "All buttons except ",
  Cell[BoxData[
      StyleBox[
        ButtonBox[
          StyleBox["BRP",
            "Section",
            FontColor->GrayLevel[1]],
          ButtonEvaluator->None,
          Background->RGBColor[0.2, 0.4, 0]],
        FontColor->RGBColor[0, 0, 1]]],
    ShowGroupOpenCloseIcon->True],
  ", ",
  Cell[BoxData[
      ButtonBox[
        StyleBox["CN",
          "Subsubsection"],
        Background->RGBColor[0, 0.8, 0.900008]]],
    ShowGroupOpenCloseIcon->True],
  ", ",
  Cell[BoxData[
      ButtonBox[
        StyleBox["Qu",
          "Subsection",
          ShowStringCharacters->True,
          FontFamily->"Helvetica",
          FontWeight->"Bold",
          FontColor->GrayLevel[0]],
        ButtonFunction:>CompoundExpression[ 
            Quit[ ]],
        ButtonEvaluator->Automatic,
        Background->GrayLevel[1]]],
    CellMargins->{{Inherited, Inherited}, {7, Inherited}},
    PageBreakAbove->True,
    LineSpacing->{1.25, 0},
    ScriptMinSize->9,
    CounterIncrements->"Text",
    StyleMenuListing->None,
    FontFamily->"Courier"],
  "and ",
  Cell[BoxData[
      ButtonBox[
        StyleBox["GV",
          "Subsubsection",
          ShowStringCharacters->True,
          FontColor->RGBColor[0, 0.500008, 0]],
        ButtonFunction:>Module[ {}, 
            CompoundExpression[ 
              If[ 
                Not[ 
                  MatchQ[ 
                    NotebookInformation[ 
                    System`Private`$GlobalValueDisplayNotebook], {
                    BlankSequence[ Rule]}]], 
                Set[ System`Private`$GlobalValueDisplayNotebook, 
                  NotebookPut[ 
                    
                    Notebook[ {}, WindowTitle -> "Values", WindowMargins -> {{
                      0, Automatic}, {0, Automatic}}, WindowSize -> {250, 
                      444}]]], 
                SetSelectedNotebook[ 
                System`Private`$GlobalValueDisplayNotebook]], 
              SelectionMove[ 
              System`Private`$GlobalValueDisplayNotebook, All, Notebook], 
              NotebookWrite[ System`Private`$GlobalValueDisplayNotebook, 
                Prepend[ 
                  Map[ Cell[ 
                      BoxData[ 
                        StringJoin[ "? ", #]], "Input", GeneratedCell -> 
                      False]&, 
                    Select[ 
                      Names[ "Global`*"], UnsameQ[ 
                        Function[ {y}, {
                          Apply[ DefaultValues, y], 
                          Apply[ NValues, y], 
                          Apply[ SubValues, y], 
                          Apply[ DownValues, y], 
                          Apply[ OwnValues, y], 
                          Apply[ UpValues, y], 
                          Apply[ FormatValues, y]}][ 
                          
                          ToExpression[ #, StandardForm, 
                            Hold]], {{}, {}, {}, {}, {}, {}, {}}]&]], 
                  Cell[ 
                    TextData[ "variables with values:"], "Text"]], After]]],
        ButtonEvaluator->Automatic]],
    GeneratedCell->True],
  " work on the selected notebook. I.e., first click on the notebook you want \
to act on with the button."
}], "Text"],

Cell[TextData[{
  Cell[BoxData[
      ButtonBox[
        StyleBox["JURL",
          "Subsection",
          ShowStringCharacters->True,
          FontFamily->"Helvetica",
          FontWeight->"Bold",
          FontColor->RGBColor[0, 0.4, 1]],
        Background->GrayLevel[1]]],
    ShowGroupOpenCloseIcon->True],
  " and ",
  Cell[BoxData[
      ButtonBox["URL",
        ButtonEvaluator->Automatic]], NotebookDefault,
    CellTags->"GeneratedButtonBoxURL"],
  " work on a selected string (in a Text or similar non-math cell). The \
resulting hyperlink from appliation of the ",
  Cell[BoxData[
      RowBox[{
        ButtonBox[
          StyleBox["JURL",
            "Subsection",
            ShowStringCharacters->True,
            FontFamily->"Helvetica",
            FontWeight->"Bold",
            FontColor->RGBColor[0, 0.4, 1]],
          Background->GrayLevel[1]], " "}]]],
  " button will only work if J/Link (see  ",
  ButtonBox["http://www.wolfram.com/solutions/mathlink/jlink",
    ButtonData:>{
      URL[ "http://www.wolfram.com/solutions/mathlink/jlink"], None},
    ButtonStyle->"Hyperlink"],
  " ) is properly installed."
}], "Text"],

Cell["\<\
Notice: most buttons below are \"crippled\" (i.e. the ButtonFunction settings \
removed) in order to save space.\
\>", "Commentary"]
}, Open  ]],

Cell[CellGroupData[{

Cell[TextData[Cell[BoxData[
    ButtonBox[
      StyleBox["URL",
        FontColor->RGBColor[0, 0, 1]],
      ButtonEvaluator->Automatic]]]], "Section",
  ShowGroupOpenCloseIcon->True],

Cell[TextData[{
  "Select a URL of the form http://www.mertig.com or rolf@mertig.com or \
ftp://ftp.nluug.nl in a text cell, then click on the ",
  Cell[BoxData[
      ButtonBox[
        StyleBox["URL",
          FontColor->RGBColor[0, 0, 1]],
        ButtonEvaluator->Automatic]]],
  " button. This will produce a hyperlink of the form: \n\n\
Cell[TextData[ButtonBox[\"http://www.mertig.com\",\n  ButtonData:>{\n    URL[ \
\"http://www.mertig.com\"], None},\n  ButtonStyle->\"Hyperlink\"]], \"Text\",\
\n  GeneratedCell->True]\n"
}], "Text"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
    ButtonBox[
      StyleBox["RGL",
        "Subsection",
        ShowStringCharacters->True,
        FontColor->RGBColor[0.400015, 0.6, 0.2]],
      ButtonFunction:>CompoundExpression[ 
          Module[ {r, nr}, 
            CompoundExpression[ 
              Set[ r, 
                NotebookRead[ 
                  InputNotebook[ ]]], 
              Set[ R, r], 
              If[ 
                UnsameQ[ r, {}], 
                CompoundExpression[ 
                  Set[ nr, 
                    ButtonBox[ r, ButtonStyle -> "RefGuideLink"]], 
                  NotebookWrite[ 
                    InputNotebook[ ], nr]]]]]],
      ButtonEvaluator->Automatic,
      Background->GrayLevel[1]]], "Section",
  ShowGroupOpenCloseIcon->True],

Cell[TextData[{
  "Select a word, then click on the RGL button and get a hyperlink to the ",
  StyleBox["Mathematica",
    FontSlant->"Italic"],
  " Reference Guide. Like:   ",
  Cell[BoxData[
      ButtonBox["Derivative",
        ButtonStyle->"RefGuideLink"]]]
}], "Text"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
    ButtonBox["PG"]], "Section",
  ShowGroupOpenCloseIcon->True],

Cell["\<\
\"Program Generator\" : All Cells of type \"Program\" in a section are \
exported to an ASCII file with the name of the section heading.
E.g.:  Save the notebook which you get by executing\
\>", "Text"],

Cell["\<\
NotebookPut[Notebook[{Cell[\"test.ssc\", \"Section\"], 
    Cell[\"testfun <- function(x) print(2*x)\", \"Program\"]}]];\
\>", "Input"],

Cell["\<\
Click on it with the PG button which will write a file test.ssc to the same \
directory where the notebook is stored.\
\>", "Text"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
    ButtonBox[
      StyleBox["JURL",
        "Subsection",
        ShowStringCharacters->True,
        FontFamily->"Helvetica",
        FontWeight->"Bold",
        FontColor->RGBColor[0, 0.4, 1]],
      Background->GrayLevel[1]]], "Section",
  ShowGroupOpenCloseIcon->True],

Cell[TextData[Cell[BoxData[
    ButtonBox[
      StyleBox["JURL",
        "Subsection",
        ShowStringCharacters->True,
        FontFamily->"Helvetica",
        FontWeight->"Bold",
        FontColor->RGBColor[0, 0.4, 1]],
      Background->GrayLevel[1]]],
  ShowGroupOpenCloseIcon->True]], "Text"],

Cell[TextData[{
  "Credits: JURL is based on the NotebookOpenURL and the GetURL function from \
J/Link as described in section 1.3.3 of the J/Link manual by Todd Gayley to \
be found at ",
  ButtonBox["http://www.wolfram.com/solutions/mathlink/jlink",
    ButtonData:>{
      URL[ "http://www.wolfram.com/solutions/mathlink/jlink"], None},
    ButtonStyle->"Hyperlink"],
  "."
}], "Commentary"],

Cell[TextData[{
  "Select a URL to a ",
  StyleBox["Mathematica",
    FontSlant->"Italic"],
  " notebook or .m file in a text cell, e.g.:\n\
http://www.feyncalc.com/Contract/Contract.nb\nThen click on the ",
  Cell[BoxData[
      ButtonBox[
        StyleBox["JURL",
          "Subsection",
          ShowStringCharacters->True,
          FontFamily->"Helvetica",
          FontWeight->"Bold",
          FontColor->RGBColor[0, 0.4, 1]],
        Background->GrayLevel[1]]],
    ShowGroupOpenCloseIcon->True],
  "button.\nThis produces a hyperlink which when clicked on will fetch the \
notebook Contract.nb with the help of J/Link, which has to be properly \
installed, see, e.g., : ",
  ButtonBox["http://www.wolfram.com/solutions/mathlink/jlink",
    ButtonData:>{
      URL[ "http://www.wolfram.com/solutions/mathlink/jlink"], None},
    ButtonStyle->"Hyperlink"],
  ", save the notebook to the directory as specified by the ",
  StyleBox["Mathematica",
    FontSlant->"Italic"],
  " global variable $TemporaryPrefix (i.e., /tmp/ for Unix and C:\\TEMP\\ for \
Windows)"
}], "Text"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
    ButtonBox["SD"]], "Section",
  ShowGroupOpenCloseIcon->True],

Cell["\<\
Click on a notebook. Hitting SD will change the kernel directory \
(Directory[]) to the directory where the notebook is saved.\
\>", "Text"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
    ButtonBox[
      StyleBox["F2B",
        "Subsection",
        ShowStringCharacters->True,
        FontColor->RGBColor[0, 0.2, 0.8]],
      Background->RGBColor[1, 0.700008, 0]]], "Section",
  ShowGroupOpenCloseIcon->True],

Cell["\<\
Function to Button. This is useful to generate buttons with special \
ButtonFunction settings from a notebook.\
\>", "Text"],

Cell["\<\
Create a Subsubsction Cell  and place a function (e.g. NotebookCreate[]) in \
an input cell.\
\>", "Text"],

Cell[CellGroupData[{

Cell["name", "Subsubsection"],

Cell[BoxData[
    \(NotebookCreate[]\)], "Input"],

Cell[TextData[{
  "Select the cells (or inside the Cell group) and click on",
  Cell[BoxData[
      ButtonBox[
        StyleBox["F2B",
          "Subsection",
          ShowStringCharacters->True,
          FontColor->RGBColor[0, 0.2, 0.8]],
        Background->RGBColor[1, 0.700008, 0]]],
    ShowGroupOpenCloseIcon->True],
  ". This will create a cell:"
}], "Text"],

Cell[BoxData[
    ButtonBox["name",
      ButtonFunction:>NotebookCreate[ ],
      ButtonEvaluator->Automatic]], NotebookDefault,
  GeneratedCell->True],

Cell["\<\
which looks unformatted like:
Cell[BoxData[
    ButtonBox[\"name\",
      ButtonFunction:>NotebookCreate[ ],
      ButtonEvaluator->Automatic]], NotebookDefault,
  GeneratedCell->True]\
\>", "Text"],

Cell[TextData[{
  "Furthermore a button is automatically created from this cell.\nTo compose \
several of these buttons into a palette copy the created cells in a notebook \
an click on ",
  Cell[BoxData[
      ButtonBox[
        StyleBox["HP",
          "Subsubsection",
          ShowStringCharacters->True,
          FontColor->RGBColor[0.6, 0, 0.2]]]],
    GeneratedCell->True],
  " (horizontal palette) or ",
  Cell[BoxData[
      ButtonBox[
        StyleBox["VP",
          "Subsubsection",
          ShowStringCharacters->True,
          FontColor->RGBColor[0.6, 0, 0.2]]]],
    GeneratedCell->True],
  " (vertical palette)."
}], "Text"]
}, Closed]]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
    StyleBox[
      ButtonBox[
        StyleBox["CN",
          "Subsection",
          ShowStringCharacters->True],
        ButtonEvaluator->Automatic,
        Background->RGBColor[0.4, 0.6, 1]],
      Background->RGBColor[0.4, 0.6, 1]]], "Section",
  ShowGroupOpenCloseIcon->True],

Cell[TextData[{
  "Clear notebooks, i.e., close all Untitled- notebooks. (This will not work \
in ",
  StyleBox["Mathematica",
    FontSlant->"Italic"],
  " 3.0 version for X)."
}], "Text"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
    ButtonBox["CP",
      ButtonFunction:>CompoundExpression[ 
          NotebookPut[ 
            NotebookGet[ 
              InputNotebook[ ]]]],
      ButtonEvaluator->Automatic]], "Section",
  ShowGroupOpenCloseIcon->True],

Cell[TextData[{
  "Notebook copy; i.e., make an identical copy of the selected notebook (up \
to the Windows title). (Since there is a bug in the X-version of ",
  StyleBox["Mathematica",
    FontSlant->"Italic"],
  " the WindowMargins are not the same; on other platforms the copied \
notebook will be placed exactly on top of the selected notebook)."
}], "Text"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
    RowBox[{
      ButtonBox[
        StyleBox["HP",
          "Subsubsection",
          ShowStringCharacters->True,
          FontColor->RGBColor[0.6, 0, 0.2]]], ",", " ", 
      ButtonBox[
        StyleBox["VP",
          "Subsubsection",
          ShowStringCharacters->True,
          FontColor->RGBColor[0.6, 0, 0.2]]]}]], "Section",
  ShowGroupOpenCloseIcon->True],

Cell["Create horizontal and vertical palettes.", "Text"],

Cell[TextData[{
  "See notes in",
  Cell[BoxData[
      ButtonBox[
        StyleBox["F2B",
          "Subsection",
          ShowStringCharacters->True,
          FontColor->RGBColor[0, 0.2, 0.8]],
        Background->RGBColor[1, 0.700008, 0]]],
    ShowGroupOpenCloseIcon->True]
}], "Text"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
    ButtonBox[
      StyleBox[\(150  %\),
        "Subsubsection"],
      ButtonFunction:>CompoundExpression[ 
          FrontEndExecute[ {
            FrontEndToken[ 
              InputNotebook[ ], "Magnification", "1.5"]}], Null],
      ButtonEvaluator->Automatic]], "Section",
  ShowGroupOpenCloseIcon->True],

Cell["\<\
Change the magnification of the selected notebook. (This saves at least one \
click on most platforms ..., and since (at least for me) this is a FOC \
(frequently occuring click) it is worthwile having).\
\>", "Text"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
    ButtonBox[
      StyleBox["Cl",
        FontFamily->"Helvetica",
        FontWeight->"Bold",
        FontColor->GrayLevel[1]],
      ButtonFunction:>CompoundExpression[ 
          NotebookClose[ 
            InputNotebook[ ]]],
      ButtonEvaluator->Automatic,
      Background->RGBColor[0.8, 0, 0]]], "Section",
  ShowGroupOpenCloseIcon->True],

Cell[TextData[{
  "This close the selected notebook ",
  StyleBox["without",
    FontSlant->"Italic"],
  " asking. Therefore, be sure to have clicked on the right notebook to close \
..."
}], "Text"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
    ButtonBox[
      StyleBox["Qu",
        "Subsection",
        ShowStringCharacters->True,
        FontFamily->"Helvetica",
        FontWeight->"Bold",
        FontColor->GrayLevel[0]],
      ButtonFunction:>CompoundExpression[ 
          Quit[ ]],
      ButtonEvaluator->Automatic,
      Background->GrayLevel[1]]], "Section",
  ShowGroupOpenCloseIcon->True],

Cell["This quits the kernel.", "Text"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
    ButtonBox["ZWT",
      ButtonFunction:>CompoundExpression[ 
          SelectionMove[ 
            InputNotebook[ ], All, Cell], 
          SetOptions[ 
            NotebookSelection[ 
              InputNotebook[ ]], ZeroWidthTimes -> Not[ 
              Part[ 
                Options[ 
                  NotebookSelection[ 
                    InputNotebook[ ]], ZeroWidthTimes], 1, 2]]]],
      ButtonEvaluator->Automatic]], "Section",
  ShowGroupOpenCloseIcon->True],

Cell["\<\
This will set the option ZeroWithTimes -> True on the selected Cell(s). This \
is extremely useful when you want to get the spacing right in inline cells. \
The reason is that RowBox has a very inconvenient and undesirable default of \
putting multiplication spaces between its elements, which is in general of \
course nonsense.\
\>", "Text"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
    ButtonBox["cd",
      Background->RGBColor[0.4, 0.6, 1]]], "Section",
  ShowGroupOpenCloseIcon->True],

Cell["Change kernel directories from notebook.", "Text"],

Cell[TextData[{
  "Create a palette with all subdirectories as seen from the kernel \
(Directory[]) listed below the current directory (clicking on the top-most \
green button will move one directory up). The palette created should only be \
used in the current session (i.e., the buttons rely on a temporary functions \
defined in the ",
  Cell[BoxData[
      ButtonBox["cd",
        Background->RGBColor[0.4, 0.6, 1]]],
    ShowGroupOpenCloseIcon->True],
  " )."
}], "Text"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
    ButtonBox[\(\(*\)\(\(.\)\(nb\)\)\)]], "Section",
  ShowGroupOpenCloseIcon->True],

Cell["\<\
Paste a palette at the insertion point consisting of all notebooks (files \
with file extension .nb) in the current kernel directory. Clicking on any of \
the buttons of the palette will open the notebook.\
\>", "Text"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
    ButtonBox[\(\(*\)\(\(.\)\(m\)\)\)]], "Section",
  ShowGroupOpenCloseIcon->True],

Cell["\<\
Paste a palette at the insertion point consisting of all .m files in the \
current kernel directory. Clicking on any of the buttons of the palette will \
open the file in a notebook.\
\>", "Text"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
    ButtonBox[\(<< *.m\)]], "Section",
  ShowGroupOpenCloseIcon->True],

Cell["\<\
Paste a palette at the insertion point consisting of all .m files in the \
current kernel directory. Clicking on any of the buttons of the palette will \
load the file. This can be used to load Add-On packages.\
\>", "Text"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
    ButtonBox["*"]], "Section",
  ShowGroupOpenCloseIcon->True],

Cell["\<\
Paste a palette at the insertion point consisting of all files in the current \
kernel directory. Clicking on any of the buttons of the palette will open the \
file in a notebook.\
\>", "Text"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
    ButtonBox[
      StyleBox["GV",
        "Subsubsection",
        ShowStringCharacters->True,
        FontColor->RGBColor[0, 0.500008, 0]]]], "Section",
  ShowGroupOpenCloseIcon->True],

Cell["\<\
This creates a palette with all variables  in the Global` context which have \
a value (or function definition). In order to see the value evaluate the \
relevant cell.\
\>", "Text"]
}, Closed]],

Cell[CellGroupData[{

Cell[TextData[{
  " ",
  Cell[BoxData[
      ButtonBox[
        StyleBox["{",
          "Subsection",
          ShowStringCharacters->True,
          FontColor->RGBColor[1, 0, 0]],
        ButtonFunction:>CompoundExpression[ 
            SelectionMove[ 
              InputNotebook[ ], All, Notebook], 
            FrontEndExecute[ {
              FrontEndToken[ 
                InputNotebook[ ], "SelectionOpenAllGroups"]}]],
        ButtonEvaluator->Automatic]]]
}], "Section",
  ShowGroupOpenCloseIcon->True],

Cell["\<\
Select any cell group(s). Clicking on this button will open all Cell \
subgroups.\
\>", "Text"]
}, Closed]],

Cell[CellGroupData[{

Cell[TextData[StyleBox["E↓",
  Background->RGBColor[0.100008, 0.6, 0.6]]], "Section",
  ShowGroupOpenCloseIcon->True],

Cell[TextData[{
  "Click somewhere in the notebook where you want to evaluate cells, between \
cells or in a Cell. Clicking then on the ",
  StyleBox["E↓",
    Background->RGBColor[0.100008, 0.6, 0.6]],
  " button evaluates all Input cells downwards."
}], "Text"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
    ButtonBox["ENB",
      ButtonFunction:>CompoundExpression[ 
          SelectionMove[ 
            InputNotebook[ ], Before, Notebook], 
          SelectionMove[ 
            InputNotebook[ ], All, Notebook], 
          SelectionEvaluate[ 
            InputNotebook[ ]], 
          SelectionMove[ 
            InputNotebook[ ], After, Notebook]],
      ButtonEvaluator->Automatic]], "Section",
  ShowGroupOpenCloseIcon->True],

Cell["\<\
This evaluates the whole notebook. (functionally the same as using the Kernel \
/ Evaluation / Evaluate Notebook menu item).\
\>", "Text"]
}, Closed]],

Cell[CellGroupData[{

Cell[TextData[StyleBox["E↑",
  Background->RGBColor[0.100008, 0.6, 0.6]]], "Section",
  ShowGroupOpenCloseIcon->True],

Cell[TextData[{
  "Click somewhere in the notebook where you want to evaluate cells, between \
cells or in a Cell. Clicking then on the ",
  StyleBox["E↑",
    Background->RGBColor[0.100008, 0.6, 0.6]],
  " button evaluates all Input cells from the beginning of the notebook until \
the cell where you clicked."
}], "Text"]
}, Closed]],

Cell[CellGroupData[{

Cell[TextData[{
  " ",
  Cell[BoxData[
      ButtonBox[
        StyleBox["}",
          "Subsection",
          ShowStringCharacters->True,
          FontColor->RGBColor[1, 0, 0]],
        ButtonFunction:>CompoundExpression[ 
            FrontEndExecute[ {
              FrontEndToken[ 
                InputNotebook[ ], "SelectionCloseAllGroups"]}]],
        ButtonEvaluator->Automatic]]]
}], "Section",
  ShowGroupOpenCloseIcon->True],

Cell["\<\
Select any cell group(s). Clicking on this button will close all Cell \
subgroups.\
\>", "Text"]
}, Closed]],

Cell[CellGroupData[{

Cell[BoxData[
    StyleBox[
      ButtonBox[
        StyleBox["BRP",
          "Section",
          FontColor->GrayLevel[1]],
        ButtonEvaluator->None,
        Background->RGBColor[0.2, 0.4, 0]],
      FontColor->RGBColor[0, 0, 1]]], "Section",
  ShowGroupOpenCloseIcon->True],

Cell["\<\
This button initializes the BRP[ expr ] function. BRP[expr] can be used as a \
break point in programs. It will open a new notebook window with the value of \
anyexpression in it. The flow of the program is interrupted, until the OK \
button in the new notebook is pressed.\
\>", "Text"],

Cell["\<\
Furthermore the following symbols are colored when a cell is converted to \
StandardForm (i.e., there are MakeBoxes rules on those symbols).\
\>", "Text"],

Cell[TextData[{
  StyleBox["*Notebook*",
    FontColor->RGBColor[0.2, 0, 1]],
  StyleBox[" *Select*",
    FontColor->RGBColor[1, 0.4, 0]],
  StyleBox[" *Cell*",
    FontColor->RGBColor[0.4, 0.6, 0]],
  StyleBox["\nDo",
    FontSize->18,
    FontColor->RGBColor[0, 0.4, 0]],
  StyleBox[", ",
    FontColor->RGBColor[0, 0.4, 0]],
  StyleBox["Block",
    FontSize->18,
    FontColor->RGBColor[0, 0.4, 0]],
  StyleBox[", ",
    FontColor->RGBColor[0, 0.4, 0]],
  StyleBox["Module",
    FontSize->18,
    FontColor->RGBColor[0, 0.4, 0]],
  StyleBox["\nFrontEndExecute BrowserCategory TaggingRules",
    FontSize->18,
    FontSlant->"Italic",
    FontColor->RGBColor[0.6, 0.8, 0.100008]]
}], "Text"]
}, Closed]]
}, Open  ]]
},
FrontEndVersion->"4.1 for Microsoft Windows",
ScreenRectangle->{{0, 1600}, {0, 1127}},
WindowToolbars->"EditBar",
WindowSize->{999, 915},
WindowMargins->{{Automatic, 257}, {Automatic, 81}},
Magnification->1,
StyleDefinitions -> "Report.nb"
]

URL

Module[{m = False, r, nr, r2, r3, r4},r=NotebookRead[InputNotebook[]];If[StringQ[r],If[StringMatchQ[r, "*\\@*.*"],m=True];If[m||StringMatchQ[r,"*:*.*",IgnoreCase->True],nr = 
                        ButtonBox[r, 
                          ButtonData -> {URL[
                                If[m, "mailto:", ""] <> r], None}, 
                          ButtonStyle -> "Hyperlink"];SetOptions[NotebookSelection[InputNotebook[]],TaggingRules->"wwwtag"];r2=NotebookRead[InputNotebook[]];SelectionMove[InputNotebook[],All,Cell];r3=NotebookRead[InputNotebook[]];r4=r3/.StyleBox[s_,TaggingRules:>"wwwtag"]:>nr;NotebookWrite[InputNotebook[],r4]]]]

RGL

Module[{r, nr},r=NotebookRead[InputNotebook[]];R = r;If[r =!= {},nr = 
                  ButtonBox[r, ButtonStyle -> "RefGuideLink"];NotebookWrite[InputNotebook[],nr]]]

PG

Generate an ASCII file.

Module[{spcodestyle = "Program"},opened = {};fixstring[z_String] := 
            FixedPoint[
              StringReplace[#1, {" " -> "", "\n" -> "\
", "\t" -> "", ":" :> ""}] &, z];strrep[z_] := 
            z /. s_String :> 
                StringReplace[
                  s, {"->" -> "->", "\[Null]" -> "\
", "←" -> "<-"}];openwrite[
              z_String] := (op = 
                OpenWrite[z, PageWidth -> ∞]; 
              AppendTo[opened, op]; op);closeit := Close /@ opened;makestring[Cell[TextData[t1_List], ___],Cell[TextData[t2_List], ___],c___]:=makestring[Cell[TextData[Join[t1, {"\n"}, t2]]],c];makestring[s_String] := s;makestring[Cell[TextData[t_], ___]]:=makestring[TextData[t]];makestring[TextData[{s__}]]:=makestring2[strrep[{s}//.{Cell[__]:>Sequence[],ButtonBox[b_, __] :> b,StyleBox[a_, ___] :> a}]];makestring2[{st__String}] := StringJoin[st];SetDirectory["FileName"/.NotebookInformation[InputNotebook[]]/.FrontEnd`FileName[
                    d_, __] :> ToFileName[d]/."FileName" -> $Failed];tmp1=NotebookGet[InputNotebook[]]//.Cell[CellGroupData[{a__}, _]]:>a;tmp2=tmp1[[1]]/.Cell[a_, 
                            b_, __]:>Cell[a, 
                            b]/.{Cell[TextData[StyleBox[a_String, ___]], 
                              st_, ___]:>Cell[TextData[{a}], st],Cell[_, "Subsection", ___]:>Cell[TextData[{"\n"}], spcodestyle]}/.Cell[x_, 
                        st_String, ___]:>\(Sequence[] /; \(\(\)\(! \((MemberQ[{"Section", spcodestyle}, st])\)\)\)\)/.Cell[s_, "Section", __]:>Cell[s, "Section"]/.Cell[TextData[{___, s_String}], "Section"]:>Cell[s, "Section"]/.Cell[s_String, "Section"]:>Cell[fixstring[s], "Section"];tete = tmp2;If[FreeQ[tmp2,Cell[_, "Section", ___]],PrependTo[tmp2,Cell["Script.ssc", "Section"]]];tmp2b=tmp2/.Cell[s_String, 
                  spcodestyle, ___]:>Cell[TextData[{s}], 
                  spcodestyle];\(tmp3 = 
            Split[tmp2b, #1[[2]] =!= "Section" && #2[[2]] =!= "Section" &]\);closeit;tbl = 
            Table[Hold[WriteString][
                openwrite[
                  makestring[
                    tmp3[[i, 1, 1]]]], 
                makestring[
                  Sequence @@ 
                    tmp3[[i + 1]]]], {i, 
                1, Length[tmp3] - 1, 2}];ReleaseHold[tbl];closeit;]

JURL

Module[{r, nr, r2, r3, r4},r=NotebookRead[InputNotebook[]];$ProxyHost = None;$ProxyPort = 8080;If[StringMatchQ[r,"http:/*.m",IgnoreCase->True]||StringMatchQ[r,"http:/*.nb",IgnoreCase->True]||Or@@(StringMatchQ[r,"http:/*." <> #1,IgnoreCase->True]&)/@Join[$ImportFormats, {"JPG", "HTM", "HTML", 
                        "TXT"}],nr=Hold[ButtonBox][StyleBox[r,FontColor -> 
                            RGBColor[0, 0.5`, 0.5`],FontVariations->{"Underline"->True}],ButtonEvaluator -> Automatic,ButtonNote -> "Open " <> r,With[{rr = r},ButtonFunction:>Module[{openRemoteFileAsNotebook, 
                                  retrieveRemoteFile, winsize = {590, 500}},Off[General::"spell1"];Off[Get::"noopen"];Off[Needs::"nocont"];System`Private`checkifjlinkisthere = 
                                    Needs["JLink`"];If[System`Private`checkifjlinkisthere === $Failed,NotebookPut[Notebook[{Cell[TextData[{"Please install \
J/Link. See: ", ButtonBox["http://www.wolfram.com/solutions/mathlink/jlink", 
                                        ButtonData :> {URL[
                                        "http://www.wolfram.com/solutions/\
mathlink/jlink"], None}, ButtonStyle -> "Hyperlink"]}], "Subtitle"]},WindowSize -> {677, 
                                        192},WindowMargins -> {{Automatic, 195}, {Automatic, 118}},StyleDefinitions -> 
                                        "NaturalColor.nb"]],On[Get::"noopen"];On[Needs::"nocont"];openRemoteFileAsNotebook[
                                        url_String]:=Module[{rf, rf1, rf2, nbnew, 
                                        nbnew2},rf = 
                                        retrieveRemoteFile[url];rf1 = rf;If[StringQ[rf],If[Or@@(StringMatchQ[rr,"http:/*." <> #1,IgnoreCase->True]&)/@Join[$ImportFormats, {"JPG"}],nbnew=NotebookPut[Notebook[{Cell["temp=Import[" <> "\"" <> rf <> 
                                        "\"" <> "]", "Input"],Cell["If[Head[temp]===Graphics,Show[temp]]", "Input"]}]];SelectionMove[nbnew,All,Notebook];SelectionEvaluate[nbnew],If[StringMatchQ[rf,"*.nb",IgnoreCase->True],rf2 = rf,rf2 = rf <> ".nb"; 
                                        CopyFile[rf, rf2]];nbnew=NotebookOpen[rf2];SelectionMove[nbnew,All,Notebook];nbnew2=NotebookRead[nbnew];If[!StringMatchQ[rf1,"*.nb",IgnoreCase->True],nbnew2=nbnew2/.Cell[a_, "Input", ___]:>Cell[a, "Program"]];NotebookWrite[nbnew, nbnew2];SetOptions[nbnew, 
                                        WindowSize -> winsize];SelectionMove[nbnew,Before,Notebook];SetSelectedNotebook[nbnew];NotebookSave[nbnew];SelectionMove[nbnew,All,Notebook]]];];retrieveRemoteFile[
                                        url_String, opts___?OptionQ]:=ToExpression[
                                        "JLink`JavaBlock"][Module[\({u, stream, numRead, outFile, 
                                        buf, prxyHost, prxyPort, 
                                        javanew = 
                                        ToExpression["JLink`JavaNew"], 
                                        filename}, {prxyHost, 
                                        prxyPort} = \({ProxyHost, 
                                        ProxyPort} /.  
                                         Flatten[{opts}]\) /.  
                                         Options[
                                        retrieveRemoteFile]; \(ToExpression[
                                        "JLink`StartJava"]\)[]; 
                                        filename = 
                                        StringDrop[url, 
                                        Last[Last[StringPosition[url, 
                                        "/"]]]]; FL = filename; 
                                        If[StringQ[
                                        prxyHost], \(ToExpression[
                                        "JLink`SetInternetProxy"]\)[prxyHost, 
                                        prxyPort]]; 
                                        u = javanew["java.net.URL", url]; 
                                        stream = u[openStream[]]; 
                                        If[stream === $Failed, 
                                        Return[$Failed]]; 
                                        buf = javanew["[B", 5000]; 
                                        outFile = 
                                        OpenWrite[$TemporaryPrefix <> 
                                        filename, 
                                        DOSTextFormat -> False]; 
                                        While[\((numRead = 
                                        stream[read[buf]])\) > 0, 
                                        WriteString[outFile, 
                                        FromCharacterCode[\((If[#1 < 0, #1 + 
                                        256, #1] &)\) /@ 
                                        Take[\(ToExpression["JLink`Val"]\)[
                                        buf], numRead]]]]; stream[close[]]; 
                                        Close[outFile]\)]];];openRemoteFileAsNotebook[rr];]]];SetOptions[NotebookSelection[InputNotebook[]],TaggingRules->"wwwtag"];r2=NotebookRead[InputNotebook[]];SelectionMove[InputNotebook[],All,Cell];r3=NotebookRead[InputNotebook[]];r4=r3/.StyleBox[s_,TaggingRules:>"wwwtag"]->ReleaseHold[nr];NotebookWrite[InputNotebook[],r4]]]

SD

SetDirectory["FileName"/.NotebookInformation[InputNotebook[]]/.FrontEnd`FileName[d_, __] :> 
            ToFileName[d]/."FileName" -> $Failed]

F2B

ButtonTools`F2B=Function[{nb},Module[{backgr, busu, butbox, buttontitle, bts, f, funhead, 
                  holdSequence, NBMessage, newcell, nf, r, readit, text, 
                  writeit},r=NotebookRead[nb];FunctionToButton::"errorbox" = 
                    "ErrorBox encountered. Change the source cell to \
InputForm,then to StandardForm and try again";NBMessage["errorBox"]:=Module[{mnb},mnb=NotebookPut[Notebook[{Cell[BoxData[
                                        "Message[FunctionToButton::errorbox]"],"Input",CellOpen->False]},WindowElements -> {"MagnificationPopUp", "VerticalScrollBar"},WindowMargins -> {{5, 
                                        Automatic}, {Automatic, 5}},WindowSize -> {580, 270},Magnification -> 2,Background -> 
                                    RGBColor[0.9, 0.9, 0.7],ShowCellBracket->False]];SelectionMove[mnb,All,Notebook];SelectionEvaluate[mnb];NotebookWrite[mnb,Cell[BoxData[ButtonBox[StyleBox["Close", 
                                        "Subtitle"],ButtonFunction:>NotebookClose[ButtonNotebook[]],ButtonEvaluator :> 
                                        Automatic]],NotebookDefault,TextAlignment -> Center,Active->True]];SetSelectedNotebook[mnb];];If[!(MatchQ[r,Cell[CellGroupData[__]]]),SelectionMove[nb,All,CellGroup];readit=NotebookRead[nb],readit = r];If[!(MatchQ[readit,Cell[CellGroupData[__, _]]]),NBMessage["Please select a Cell group"],r=Flatten[{readit}]/.Cell[es_String, "Input", rest___]:>Cell[BoxData[es], "Input", rest];r=r//.Cell[CellGroupData[{cels:BlankSequence[Cell]},_]]:>cels;If[MatchQ[r[[1]],Cell[TextData[a_], 
                                  style_ /; style =!= "Input", ___]],text = 
                                RowBox[
                                  Flatten[{r[[1, 1, 
                                        1]]}]];If[MatchQ[
                                    r[[1, 1, 
                                      1]], 
                                    StyleBox[_String, __]],buttontitle=Replace[r[[1, 1, 
                                        1]],StyleBox[a_, b__]->StyleBox[StyleBox[a,r[[1, 
                                        2]],ShowStringCharacters->True],b,ShowStringCharacters->True]],buttontitle=StyleBox[text,r[[1, 
                                        2]],ShowStringCharacters->True]]];If[MatchQ[r[[1]],Cell[es_String, 
                                  style_ /; style =!= "Input", ___]],If[StringMatchQ[
                                  r[[1, 
                                    1]], "*\"*"],buttontitle=StyleBox[r[[1, 
                                        1]],ShowStringCharacters->True],buttontitle = 
                                  r[[1, 
                                    1]]]];r=r/.Cell[a_, b_ /; b =!= "Input", ___]:>Sequence[]/.Cell[_, "Input", ___, 
                                  Evaluatable -> False, ___]:>Sequence[]/.TextData -> 
                              BoxData;If[MatchQ[r[[1]],Cell[BoxData[_], "Input", ___]],f = 
                                MakeExpression[
                                  r[[1, 
                                    1]], StandardForm];Do[If[
                                  MatchQ[
                                    nf = MakeExpression[
                                        r[[j, 
                                        1]], 
                                        StandardForm] /. HoldComplete[a_; __] -> HoldComplete[a], 
                                    HoldComplete[_[__] := _]], 
                                  Return[
                                    funhead = Extract[nf, {1, 1, 0}]]], {j, 
                                  Length[r]}]];If[! (ValueQ[
                                funhead]), funhead = "function"];If[! (ValueQ[
                                buttontitle]), buttontitle = funhead];f = 
                          Prepend[
                            Table[MakeExpression[
                                r[[i, 
                                  1]], StandardForm], {i, 
                                2, Length[r]}], f];If[! (FreeQ[f, 
                                  ErrorBox[__]]) && 
                            FreeQ[f, HoldPattern[ErrorBox[_BlankSequence]]], 
                          NBMessage["errorBox"]];backgr = 
                          Sequence @@ 
                            Cases[buttontitle, 
                              HoldPattern[Background -> _], -1];buttontitle = 
                          buttontitle /. (Background -> _) :> Sequence[];butbox = ButtonBox[buttontitle, 
                                RuleDelayed @@ {ButtonFunction, Hold[
                                        CompoundExpression][
                                      Sequence @@ f]}, backgr, 
                                ButtonEvaluator -> 
                                  Automatic] /. {Hold[
                                    CompoundExpression] :> 
                                  CompoundExpression, 
                                HoldComplete[z_] :> 
                                  z} /. Hold @@ {funhead} -> funhead;butbox = 
                          butbox //. {HoldPattern[a___; 
                                  Null; b___] :> (a; b), 
                              HoldPattern[a___; b__; 
                                  c___] :> (a; b; c)};butbox = 
                          butbox /. HoldPattern[
                                CompoundExpression[a_]] :> a;bts = 
                          buttontitle //. StyleBox[
                                a_, ___] :> a;writeit=readit/.Cell[__,CellTags->"GeneratedButtonBox" <> 
                                      bts,___]:>Sequence[];If[! (StringQ[
                                bts]), bts = "BU"];newcell=Cell[BoxData[butbox],"NotebookDefault",CellTags->"GeneratedButtonBox" <> 
                                  bts];writeit=writeit/.Cell[CellGroupData[{c__}, oc_]]:>Cell[CellGroupData[{c, newcell}, oc]];NotebookWrite[nb, 
                          writeit];NotebookFind[nb,"GeneratedButtonBox" <> bts,All,CellTags];If[buttontitle =!= "Action",FrontEndExecute[{FrontEnd`FrontEndToken[nb, 
                                    "GeneratePalette"]}];];FrontEndExecute[FrontEnd`SetSelectedNotebook[nb]]]]];

ButtonTools`F2B[InputNotebook[]]

CN

ButtonTools`CN = 
      NotebookClose /@ 
        Select[Notebooks[], 
          FreeQ[NotebookInformation[#], "FileName"] &];

ButtonTools`CN

HP

NotebookFind[InputNotebook[], "NotebookDefault", All, 
      CellStyle];

SelectionMove[NotebookPut[Notebook[{Cell[BoxData[GridBox[Transpose[Select[NotebookRead[InputNotebook[]],! (FreeQ[#1, ButtonBox]) &]/.Cell[BoxData[a_], __]:>{a}],RowSpacings -> 0,ColumnSpacings -> 0]],"NotebookDefault"]},Magnification -> 1]],All,Notebook]

FrontEndExecute[{FrontEndToken[
          FrontEnd`SelectedNotebook[], "GeneratePalette"]}]

VP

NotebookFind[InputNotebook[], "NotebookDefault", All, 
        CellStyle];

SelectionMove[NotebookPut[Notebook[{Cell[BoxData[GridBox[Select[NotebookRead[InputNotebook[]],! (FreeQ[#1, 
                                      ButtonBox]) &]/.Cell[BoxData[a_], __]:>{a},RowSpacings -> 0,ColumnSpacings -> 0]],"NotebookDefault"]}]],All,Notebook]

FrontEndExecute[{FrontEndToken[
          FrontEnd`SelectedNotebook[], "GeneratePalette"]}]

CP

NotebookPut[NotebookGet[InputNotebook[]]]

150%

FrontEndExecute[{FrontEndToken[InputNotebook[], "Magnification", 
          "1.5"]}]

Cl

NotebookClose[InputNotebook[]]

Qu

Quit[]

ZWT

SelectionMove[InputNotebook[], All, Cell]

SetOptions[NotebookSelection[InputNotebook[]], 
      ZeroWidthTimes -> 
        Not[Options[NotebookSelection[InputNotebook[]], 
              ZeroWidthTimes][[1, 2]]]]

cd

Module[{},System`Private`dir`PastePalette[___]:=(SelectionMove[InputNotebook[],All,Cell];NotebookWrite[InputNotebook[],Cell[BoxData[
                          System`Private`dir`ListDirectories[]],"Text",Active->True]];SelectionMove[InputNotebook[],Previous,Cell]);Options[
              System`Private`dir`ListDirectories] = {ExcludeDirectories -> {".*"}, 
              PrologButtons :> {ButtonBox[
                    "↑ " <> 
                      System`Private`dir`LastDirectory[Directory[]], 
                    ButtonFunction :> (SetDirectory[
                          ParentDirectory[]]; 
                        System`Private`dir`PastePalette[]), 
                    ButtonEvaluator -> Automatic, 
                    Background -> RGBColor[0.4, 0.6, 0]]}};System`Private`dir`LastDirectory[s_String]:=Catch[If[$OperatingSystem === "MacOS", 
                  If[ParentDirectory[] === s, Throw[s]]];If[Directory[] == ParentDirectory[],s,Module[{t = StringTake[s, -1], j = 1, n}, 
                      While[j < StringLength[s], j++; 
                        n = StringTake[s, {-j, -j}]; 
                        If[StringMatchQ[n, $PathnameSeparator], Return[t], 
                          t = n <> t]]; ]]];System`Private`dir`ListDirectories[opts___Rule]:=Module[{dirs, dirs2, exclude, gridboxops, macfix, 
                  InputttNotebook, prologbuttons},\(If[$OperatingSystem =!= "MacOS", 
                    dirs = Select[FileNames["*", "*", 0], 
                        FileType[#1] === Directory &], 
                    dirs = Select[FileNames["*", "*", 0], 
                        FileType[#1] === Directory || 
                            FileType[#1] === 
                                None && \(! StringMatchQ[#1, "*.*"]\) &]; 
                    dirs = dirs /.   s_String :> 
                          StringDrop[s, 1]]\);\(exclude = \(ExcludeDirectories /.  {opts}\) /.   Options[System`Private`dir`ListDirectories]\);Do[dirs = 
                      Select[dirs, ! StringMatchQ[#1, 
                              exclude[[i]]] &], {i, Length[exclude]}];\(prologbuttons = \(PrologButtons /.  {opts}\) /.   Options[System`Private`dir`ListDirectories]\);\(prologbuttons = 
                    List /@ Flatten[{prologbuttons}] /.  
                           HoldPattern[ParentDirectory[]] -> 
                        ParentDirectory[]\);gridboxops = 
                    Sequence[RowSpacings -> 0, 
                      ColumnAlignments -> {Left}];macfix[s_String] := 
                    If[$OperatingSystem === "Ma\.1acOS", 
                      StringReplace[s, "::" -> ":"], s];dirs2=GridBox[Join[prologbuttons,({ButtonBox[#1,ButtonFunction->Hold[CompoundExpression][Hold[SetDirectory][
                                        macfix[
                                        Directory[] <> $PathnameSeparator <> #1]],Hold[SelectionMove][InputttNotebook[],All,ButtonCell],Hold[NotebookWrite][InputttNotebook[],Cell[BoxData[Hold[
                                        System`Private`dir`ListDirectories][]],"Text",Active->True,ZeroWidthTimes->True],All]],ButtonEvaluator -> 
                                        Automatic]}&)/@dirs],gridboxops]/.(ButtonFunction -> 
                                  b_) -> ButtonFunction :> b/.Hold[CompoundExpression] :> 
                            CompoundExpression/.Hold[a_] :> a/.InputttNotebook->InputNotebook;dirs2];System`Private`dir`PastePalette[]]

*.nb

Module[{},Options[
              System`Private`dir`ListFilenames] = {ExcludeFilenames -> {}, RestrictFileNames -> "*.nb"};System`Private`dir`PasteFilePalette[___]:=(SelectionMove[InputNotebook[],All,Cell];NotebookWrite[InputNotebook[],Cell[BoxData[System`Private`dir`ListFilenames[]],"Text",Active->True,ZeroWidthTimes->True]];SelectionMove[InputNotebook[],Previous,Cell]);System`Private`dir`ListFilenames[opts___Rules]:=Module[{exclude, fils, fils2, gridboxops, macfix, 
                  restrict},fils = 
                    Select[FileNames["*", "*", 0], FileType[#1] === File &];If[$OperatingSystem === "MacOS", 
                    fils = fils /. s_String :> 
                          If[StringMatchQ[s, ":*"], StringDrop[s, 1], s]];exclude = ExcludeFilenames /. {opts} /. Options[
                        System`Private`dir`ListFilenames];Do[fils = 
                      Select[fils, ! (StringMatchQ[#1, 
                                exclude[[i]]]) &], {i, Length[exclude]}];restrict = RestrictFileNames /. {opts} /. Options[
                        System`Private`dir`ListFilenames];If[StringQ[restrict],fils=Select[fils,StringMatchQ[#1,restrict,IgnoreCase->True]&]];gridboxops = 
                    Sequence[RowSpacings -> 0, 
                      ColumnAlignments -> {Left}];macfix[s_String] := 
                    If[$OperatingSystem === "MacOS", 
                      StringReplace[s, "::" -> ":"], s];If[fils === {},fils2 = "no files found",fils2=GridBox[({ButtonBox[#1,ButtonFunction->Hold[NotebookOpen][macfix[
                                        Directory[] <> $PathnameSeparator <> #1]],ButtonEvaluator -> Automatic]}&)/@fils,gridboxops]/.(ButtonFunction -> b_) -> ButtonFunction :> b/.Hold[
                                    CompoundExpression] :> 
                                  CompoundExpression/.Hold[a_] :> 
                                a/.InputttNotebook->InputNotebook;fils2]];System`Private`dir`PasteFilePalette[]]

*.m

Module[{},System`Private`dir`PasteFilePalette[___]:=(SelectionMove[InputNotebook[],All,Cell];NotebookWrite[InputNotebook[],Cell[BoxData[System`Private`dir`ListFilenames[]],"Text",Active->True,ZeroWidthTimes->True]];SelectionMove[InputNotebook[],Previous,Cell]);Options[
              System`Private`dir`ListFilenames] = {ExcludeFilenames -> {}, RestrictFileNames -> "*.m"};System`Private`dir`ListFilenames[opts___Rules]:=Module[{exclude, fils, fils2, gridboxops, macfix, 
                  restrict},fils = 
                    Select[FileNames["*", "*", 0], FileType[#1] === File &];If[$OperatingSystem === "MacOS", 
                    fils = fils /. s_String :> 
                          If[StringMatchQ[s, ":*"], StringDrop[s, 1], s]];exclude = ExcludeFilenames /. {opts} /. Options[
                        System`Private`dir`ListFilenames];Do[fils = 
                      Select[fils, ! (StringMatchQ[#1, 
                                exclude[[i]]]) &], {i, Length[exclude]}];restrict = RestrictFileNames /. {opts} /. Options[
                        System`Private`dir`ListFilenames];If[StringQ[restrict],fils=Select[fils,StringMatchQ[#1,restrict,IgnoreCase->True]&]];gridboxops = 
                    Sequence[RowSpacings -> 0, 
                      ColumnAlignments -> {Left}];macfix[s_String] := 
                    If[$OperatingSystem === "MacOS", 
                      StringReplace[s, "::" -> ":"], s];If[fils === {},fils2 = "no files found",fils2=GridBox[({ButtonBox[#1,ButtonFunction->Hold[NotebookOpen][macfix[
                                        Directory[] <> $PathnameSeparator <> #1]],ButtonEvaluator -> Automatic]}&)/@fils,gridboxops]/.(ButtonFunction -> b_) -> ButtonFunction :> b/.Hold[
                                    CompoundExpression] :> 
                                  CompoundExpression/.Hold[a_] :> 
                                a/.InputttNotebook->InputNotebook;fils2]];System`Private`dir`PasteFilePalette[]]

<<*.m

Module[{},System`Private`dir`PasteFilePalette[___]:=(SelectionMove[InputNotebook[],All,Cell];NotebookWrite[InputNotebook[],Cell[BoxData[System`Private`dir`ListFilenames[]],"Text",Active->True,ZeroWidthTimes->True]];SelectionMove[InputNotebook[],Previous,Cell]);Options[
              System`Private`dir`ListFilenames] = {ExcludeFilenames -> {}, RestrictFileNames -> "*.m"};System`Private`dir`ListFilenames[opts___Rules]:=Module[{exclude, fils, fils2, gridboxops, macfix, 
                  restrict},fils = 
                    Select[FileNames["*", "*", 0], FileType[#1] === File &];If[$OperatingSystem === "MacOS", 
                    fils = fils /. s_String :> 
                          If[StringMatchQ[s, ":*"], StringDrop[s, 1], s]];exclude = ExcludeFilenames /. {opts} /. Options[
                        System`Private`dir`ListFilenames];Do[fils = 
                      Select[fils, ! (StringMatchQ[#1, 
                                exclude[[i]]]) &], {i, Length[exclude]}];restrict = RestrictFileNames /. {opts} /. Options[
                        System`Private`dir`ListFilenames];If[StringQ[restrict],fils=Select[fils,StringMatchQ[#1,restrict,IgnoreCase->True]&]];gridboxops = 
                    Sequence[RowSpacings -> 0, 
                      ColumnAlignments -> {Left}];macfix[s_String] := 
                    If[$OperatingSystem === "MacOS", 
                      StringReplace[s, "::" -> ":"], s];If[fils === {},fils2 = "no files found",fils2=GridBox[({ButtonBox["<<" <> #1, 
                                        ButtonFunction -> Hold[Get][
                                        macfix[
                                        Directory[] <> $PathnameSeparator <> #1]], ButtonEvaluator -> Automatic]} &) /@ fils, 
                                    gridboxops] /. (ButtonFunction -> 
                                        b_) -> ButtonFunction :> b /. Hold[
                                    CompoundExpression] :> 
                                  CompoundExpression /. Hold[a_] :> a/.InputttNotebook->InputNotebook;fils2]];System`Private`dir`PasteFilePalette[]]

*.m

Module[{},System`Private`dir`PasteFilePalette[___]:=(SelectionMove[InputNotebook[],All,Cell];NotebookWrite[InputNotebook[],Cell[BoxData[System`Private`dir`ListFilenames[]],"Text",Active->True,ZeroWidthTimes->False]];SelectionMove[InputNotebook[],Previous,Cell]);Options[
              System`Private`dir`ListFilenames] = {ExcludeFilenames -> {}, RestrictFileNames -> "*.m"};System`Private`dir`ListFilenames[opts___Rules]:=Module[{exclude, fils, fils2, gridboxops, macfix, 
                  restrict},fils = 
                    Select[FileNames["*", "*", 0], FileType[#1] === File &];If[$OperatingSystem === "MacOS", 
                    fils = fils /. s_String :> 
                          If[StringMatchQ[s, ":*"], StringDrop[s, 1], s]];exclude = ExcludeFilenames /. {opts} /. Options[
                        System`Private`dir`ListFilenames];Do[fils = 
                      Select[fils, ! (StringMatchQ[#1, 
                                exclude[[i]]]) &], {i, Length[exclude]}];restrict = RestrictFileNames /. {opts} /. Options[
                        System`Private`dir`ListFilenames];If[StringQ[restrict],fils=Select[fils,StringMatchQ[#1,restrict,IgnoreCase->True]&]];gridboxops = 
                    Sequence[RowSpacings -> 0, 
                      ColumnAlignments -> {Left}];macfix[s_String] := 
                    If[$OperatingSystem === "MacOS", 
                      StringReplace[s, "::" -> ":"], s];If[fils === {},fils2 = "no files found",fils2=GridBox[({ButtonBox[#1,ButtonFunction->Hold[NotebookOpen][macfix[
                                        Directory[] <> $PathnameSeparator <> #1]],ButtonEvaluator -> Automatic]}&)/@fils,gridboxops]/.(ButtonFunction -> b_) -> ButtonFunction :> b/.Hold[
                                    CompoundExpression] :> 
                                  CompoundExpression/.Hold[a_] :> 
                                a/.InputttNotebook->InputNotebook;fils2]];System`Private`dir`PasteFilePalette[]]

*

Module[{},System`Private`dir`PasteFilePalette[___]:=(SelectionMove[InputNotebook[],All,Cell];NotebookWrite[InputNotebook[],Cell[BoxData[System`Private`dir`ListFilenames[]],"Text",Active->True,ZeroWidthTimes->False]];SelectionMove[InputNotebook[],Previous,Cell]);Options[
              System`Private`dir`ListFilenames] = {ExcludeFilenames -> {}, RestrictFileNames -> "*"};System`Private`dir`ListFilenames[opts___Rules]:=Module[{exclude, fils, fils2, gridboxops, macfix, 
                  restrict},fils = 
                    Select[FileNames["*", "*", 0], FileType[#1] === File &];If[$OperatingSystem === "MacOS", 
                    fils = fils /. s_String :> 
                          If[StringMatchQ[s, ":*"], StringDrop[s, 1], s]];exclude = ExcludeFilenames /. {opts} /. Options[
                        System`Private`dir`ListFilenames];Do[fils = 
                      Select[fils, ! (StringMatchQ[#1, 
                                exclude[[i]]]) &], {i, Length[exclude]}];restrict = RestrictFileNames /. {opts} /. Options[
                        System`Private`dir`ListFilenames];If[StringQ[restrict],fils=Select[fils,StringMatchQ[#1,restrict,IgnoreCase->True]&]];gridboxops = 
                    Sequence[RowSpacings -> 0, 
                      ColumnAlignments -> {Left}];macfix[s_String] := 
                    If[$OperatingSystem === "MacOS", 
                      StringReplace[s, "::" -> ":"], s];If[fils === {},fils2 = "no files found",fils2=GridBox[({ButtonBox[#1,ButtonFunction->Hold[NotebookOpen][macfix[
                                        Directory[] <> $PathnameSeparator <> #1]],ButtonEvaluator -> Automatic]}&)/@fils,gridboxops]/.(ButtonFunction -> b_) -> ButtonFunction :> b/.Hold[
                                    CompoundExpression] :> 
                                  CompoundExpression/.Hold[a_] :> 
                                a/.InputttNotebook->InputNotebook;fils2]];System`Private`dir`PasteFilePalette[]]

GV

Module[{},If[! MatchQ[
                  NotebookInformation[
                    System`Private`$GlobalValueDisplayNotebook], {__Rule}],System`Private`$GlobalValueDisplayNotebook=NotebookPut[Notebook[{}, 
                    WindowTitle -> "Values", 
                    WindowMargins -> {{0, Automatic}, {0, Automatic}}, 
                    WindowSize -> {250, 444}]],SetSelectedNotebook[System`Private`$GlobalValueDisplayNotebook]];SelectionMove[System`Private`$GlobalValueDisplayNotebook,All,Notebook];NotebookWrite[System`Private`$GlobalValueDisplayNotebook,Prepend[(Cell[BoxData["? " <> #1],"Input",GeneratedCell->False]&)/@Select[
                      Names["Global`*"], Function[{y}, {DefaultValues @@ y, 
                                NValues @@ y, SubValues @@ y, 
                                DownValues @@ y, OwnValues @@ y, 
                                UpValues @@ y, FormatValues @@ y}][
                            ToExpression[#1, StandardForm, 
                              Hold]] =!= {{}, {}, {}, {}, {}, {}, {}} &],Cell[TextData["variables with values:"], "Text"]],After]]

{

SelectionMove[InputNotebook[], All, Cell]

SelectionMove[InputNotebook[], All, Cell]

SelectionMove[InputNotebook[],All,Notebook]

SelectionMove[InputNotebook[],All,Notebook]

FrontEndExecute[{FrontEndToken[InputNotebook[], 
          "SelectionOpenAllGroups"]}]

E↑

SelectionMove[InputNotebook[],After,Cell]

NotebookWrite[InputNotebook[],Cell["bishierherundnichtweiter","Input",CellOpen->False,ShowCellBracket->False,CellElementSpacings->{"CellMinHeight" -> 0},CellMargins->{{0, 0}, {0, 0}}]]

SelectionMove[InputNotebook[],Before,Notebook]

Catch[Do[SelectionMove[InputNotebook[],Next,Cell];Module[{r},If[MatchQ[r=NotebookRead[InputNotebook[]],Cell[\("bishierherundnichtweiter", "Input", ___\)]],NotebookDelete[InputNotebook[]];Throw[0],If[MatchQ[r,Cell[_, "Input", ___]],SelectionEvaluate[InputNotebook[]]]]],{10000}]]

ENB

SelectionMove[InputNotebook[],Before,Notebook];

SelectionMove[InputNotebook[],All,Notebook];

SelectionEvaluate[InputNotebook[]];

SelectionMove[InputNotebook[],After,Notebook]

E↓

SelectionMove[InputNotebook[],Before,Cell]

NotebookWrite[InputNotebook[],Cell["Start Evaluation here","SmallText",CellOpen->True,CellMargins->{{0, 0}, {0, 0}},CellTags->"hiergehtslos"]]

SelectionMove[InputNotebook[],After,Notebook];

NotebookWrite[InputNotebook[],Cell["Stop Evaluation here","SmallText",CellOpen->True,ShowCellBracket->True,CellMargins->{{0, 0}, {0, 0}},CellTags->"undhieristschluss"]];

NotebookFind[InputNotebook[],"hiergehtslos",All,CellTags];

Catch[Do[SelectionMove[InputNotebook[],Next,Cell];Module[{r},If[MatchQ[r=NotebookRead[InputNotebook[]],Cell[\("Stop Evaluation here", "SmallText", ___\)]],Throw[0],R = r;If[MatchQ[r,Cell[_, "Input", ___]],SelectionEvaluate[InputNotebook[]]]]],{100}]]

NotebookFind[InputNotebook[],"hiergehtslos",All,CellTags,AutoScroll -> False];

NotebookFind[InputNotebook[],"hiergehtslos",All,CellTags,AutoScroll -> False];

NotebookDelete[InputNotebook[]]

NotebookFind[InputNotebook[],"undhieristschluss",All,CellTags];

NotebookFind[InputNotebook[],"undhieristschluss",All,CellTags];

NotebookDelete[InputNotebook[]]

}

SelectionMove[InputNotebook[], All, Cell]

SelectionMove[InputNotebook[],All,Notebook]

SelectionMove[InputNotebook[],All,Notebook]

FrontEndExecute[{FrontEndToken[
          InputNotebook[], "SelectionCloseAllGroups"]}]

BRP

This button is the only one not created by the F2B button. I will document its creation process later.