What is the complete list of valid Front End Tokens? Preferably, by version number.
Keywords: FrontEndToken
, FrontEndTokenExecute
.
Have any new tokens been introduced since this question was first posted?
What is the complete list of valid Front End Tokens? Preferably, by version number.
Keywords: FrontEndToken
, FrontEndTokenExecute
.
Have any new tokens been introduced since this question was first posted?
I got a request to post here the undocumented tokens I already posted in an old answer on SO.
For completion, I merged my list (which is also in the link provided by @Chris) with @Rojo's list. Later, the list was merged with Vladimir's list below and two more tokens were included, so as to have here a repository of all known FE tokens.
Please feel free to update this answer as new tokens are found.
{
"AboutBoxDialog",
"Above",
"AlignBottoms",
"AlignCentersHorizontally",
"AlignCentersVertically",
"AlignLeftSides",
"AlignRightSides",
"AlignTops",
"AllWindowsFront",
"BackgroundDialog",
"Balance",
"Below",
"BringToFront",
"CellContextDialog",
"CellGroup",
"CellLabelsToTags",
"CellMerge",
"CellSplit",
"CellTagsEditDialog",
"CellTagsEmpty",
"CellTagsFind",
"CellUngroup",
"Clear",
"ClearCellOptions",
"ClearNoAutoScroll",
"Close",
"CloseAll",
"CloseMain",
"ColorSelectorDialog",
"ColorsPanel",
"CompleteSelection",
"Copy",
"CopyCell",
"CopySpecial",
"CreateCounterBoxDialog",
"CreateGridBoxDialog",
"CreateHyperlinkDialog",
"CreateInlineCell",
"CreateValueBoxDialog",
"Cut",
"CycleNotebooksBackward",
"CycleNotebooksForward",
"DebuggerAbort",
"DebuggerClearAllBreakpoints",
"DebuggerContinue",
"DebuggerContinueToSelection",
"DebuggerFinish",
"DebuggerResetProfile",
"DebuggerShowProfile",
"DebuggerStep",
"DebuggerStepIn",
"DebuggerStepInBody",
"DebuggerStepOut",
"DebuggerToggleBreakpoint",
"DebuggerToggleWatchpoint",
"DeleteBibAndNotes",
"DeleteBibReference",
"DeleteGeneratedCells",
"DeleteIndent",
"DeleteInvisible",
"DeleteNext",
"DeleteNextExpression",
"DeletePrevious",
"DeletePreviousWord",
"DistributeBottoms",
"DistributeCentersHorizontally",
"DistributeCentersVertically",
"DistributeLeftSides",
"DistributeRightSides",
"DistributeSpaceHorizontally",
"DistributeSpaceVertically",
"DistributeTops",
"DuplicatePreviousInput",
"DuplicatePreviousOutput",
"EditBibNote",
"EditStyleDefinitions",
"EnterSubsession",
"Evaluate",
"EvaluateCells",
"EvaluateInitialization",
"EvaluateNextCell",
"EvaluateNotebook",
"EvaluatorAbort",
"EvaluatorHalt",
"EvaluatorInterrupt",
"EvaluatorQuit",
"EvaluatorStart",
"ExitSubsession",
"ExpandSelection",
"ExpirationDialog",
"ExplainBeepDialog",
"ExplainColoringDialog",
"ExpressionLinewrap",
"FileNameDialog",
"FindDialog",
"FindEvaluatingCell",
"FindNextMatch",
"FindNextMisspelling",
"FindNextWarningColor",
"FindPreviousMatch",
"FinishNesting",
"FixCellHeight",
"FixCellWidth",
"FontColorDialog",
"FontFamilyB",
"FontPanel",
"FontSizeDialog",
"Fraction",
"FrontEnd`ButtonNotebook[]",
"FrontEnd`EvaluationNotebook[]",
"FrontEndHide",
"FrontEnd`InputNotebook[]",
"FrontEnd`MessagesNotebook[]",
"FrontEnd`Private`nb",
"FrontEndQuit",
"FrontEndQuitNonInteractive",
"FrontEndToken[FrontEnd`ButtonNotebook[],\"HyperlinkGo\",`distance`]",
"GenerateImageCaches",
"GenerateNotebook",
"GeneratePalette",
"GraphicsAlign",
"GraphicsBoxOptionsImageSize",
"GraphicsCoordinatesDialog",
"GraphicsOriginalSize",
"GraphicsPlotRangeAll",
"GraphicsPlotRangeAutomatic",
"GraphicsPlotRangeFixed",
"GraphicsRender",
"Group",
"HandleShiftReturn",
"HeadersFootersDialog",
"HelpDialog",
"HyperlinkGo",
"HyperlinkGoBack",
"HyperlinkGoForward",
"ImageToAutomatic",
"ImageToBinary",
"ImageToBit",
"ImageToBit16",
"ImageToByte",
"ImageToCMYK",
"ImageToggleAlphaChannel",
"ImageToggleInterleaving",
"ImageToGrayscale",
"ImageToHSB",
"ImageToReal",
"ImageToReal32",
"ImageToRGB",
"Import",
"ImportPictures",
"ImportStyleDefinitions",
"Indent",
"InsertBibAndNotes",
"InsertBibNote",
"InsertBibReference",
"InsertClipPlane",
"InsertMatchingBraces",
"InsertMatchingBrackets",
"InsertMatchingParentheses",
"InsertNewGraphic",
"InsertObject",
"InsertRawExpression",
"InsertSoftReturn",
"InsertSplitBreak",
"LicAuthFailureDialog",
"Linebreak",
"MacintoshOpenDeskAccessory",
"MakeSelectionNotSpan",
"MakeSelectionSpan",
"MenuListBoxFormFormatTypes",
"MenuListCellEvaluators",
"MenuListCellTags",
"MenuListCommonDefaultFormatTypesInput",
"MenuListCommonDefaultFormatTypesInputInline",
"MenuListCommonDefaultFormatTypesOutput",
"MenuListCommonDefaultFormatTypesOutputInline",
"MenuListCommonDefaultFormatTypesText",
"MenuListCommonDefaultFormatTypesTextInline",
"MenuListConvertFormatTypes",
"MenuListDisplayAsFormatTypes",
"MenuListExportClipboardSpecial",
"MenuListFonts",
"MenuListFontSubstitutions",
"MenuListGlobalEvaluators",
"MenuListHelpWindows",
"MenuListNotebookEvaluators",
"MenuListNotebooksMenu",
"MenuListPackageWindows",
"MenuListPalettesMenu",
"MenuListPaletteWindows",
"MenuListPlayerWindows",
"MenuListPlugInCommands",
"MenuListPrintingStyleEnvironments",
"MenuListQuitEvaluators",
"MenuListRelatedFilesMenu",
"MenuListSaveClipboardSpecial",
"MenuListScreenStyleEnvironments",
"MenuListStartEvaluators",
"MenuListStyleDefinitions",
"MenuListStyles",
"MenuListStylesheetWindows",
"MenuListTextWindows",
"MenuListWindows",
"ModifyBoxFormFormatTypes",
"ModifyDefaultFontProperties",
"ModifyEvaluatorNames",
"ModifyFontSubstitutions",
"ModifyNotebooksMenu",
"ModifyRelatedFiles",
"MoveBackward",
"MoveExpressionEnd",
"MoveForward",
"MoveLineBeginning",
"MoveLineEnd",
"MoveNext",
"MoveNextCell",
"MoveNextExpression",
"MoveNextLine",
"MoveNextPlaceHolder",
"MoveNextWord",
"MovePrevious",
"MovePreviousExpression",
"MovePreviousLine",
"MovePreviousPlaceHolder",
"MovePreviousWord",
"MoveToBack",
"MoveToFront",
"New",
"NewCDFNotebook",
"NewColumn",
"NewPackage",
"NewRow",
"NewText",
"NextFunctionTemplate",
"NotebookMail",
"NotebookMailSelection",
"NotebookOneNote",
"NotebookOneNoteSelection",
"NotebookStatisticsDialog",
"NudgeDown",
"NudgeLeft",
"NudgeRight",
"NudgeUp",
"Open",
"OpenCloseGroup",
"OpenFromNotebooksMenu",
"OpenFromNotebooksMenuEmpty",
"OpenFromPalettesMenu",
"OpenFromRelatedFilesMenu",
"OpenHelpLink",
"OpenSelection",
"OpenSelectionParents",
"OpenURL",
"OptionsDialog",
"Otherscript",
"PasswordDialog",
"Paste",
"PasteApply",
"PasteApplyNoAutoScroll",
"PasteDiscard",
"PasteDiscardNoAutoScroll",
"PasteSpecial",
"Placeholder",
"PlainFont",
"PreferencesDialog",
"PreviousFunctionTemplate",
"PrintDialog",
"PrintOptionsDialog",
"PrintSelectionDialog",
"PublishToPlayer",
"Radical",
"RebuildBibAndNotes",
"RebuildHelpIndex",
"RecordSoundDialog",
"RefreshDynamicObjects",
"RelatedFilesMenu",
"RemoveAdjustments",
"RemoveFromEvaluationQueue",
"Replace",
"ReplaceAll",
"ReplaceFind",
"ReplaceParent",
"ResetDefaultsText",
"ReverseQuote",
"Revert",
"RunColorDialog",
"RunEdgeColorDialog",
"RunFaceColorDialog",
"Save",
"SaveRename",
"SaveRenameSpecial",
"ScrollLineDown",
"ScrollLineUp",
"ScrollNotebookEnd",
"ScrollNotebookStart",
"ScrollPageBottom",
"ScrollPageDown",
"ScrollPageFirst",
"ScrollPageLast",
"ScrollPageNext",
"ScrollPagePrevious",
"ScrollPageTop",
"ScrollPageUp",
"SelectAll",
"SelectGeneratedCells",
"SelectionAnimate",
"SelectionBrace",
"SelectionBracket",
"SelectionCloseAllGroups",
"SelectionCloseUnselectedCells",
"SelectionConvert",
"SelectionConvertB",
"SelectionDisplayAs",
"SelectionDisplayAsB",
"SelectionHelpDialog",
"SelectionOpenAllGroups",
"SelectionParenthesize",
"SelectionSaveSpecial",
"SelectionScroll",
"SelectionSetFind",
"SelectionSpeak",
"SelectionSpeakSummary",
"SelectionUnbracket",
"SelectLineBeginning",
"SelectLineEnd",
"SelectNext",
"SelectNextExpression",
"SelectNextLine",
"SelectNextWord",
"SelectNotebookWindow",
"SelectPrevious",
"SelectPreviousExpression",
"SelectPreviousLine",
"SelectPreviousWord",
"ServerText",
"SetCitationStyle",
"SetDefaultGraphic",
"ShortNameDelimiter",
"SimilarCellBelow",
"SoundPlay",
"SpellCheckerDialog",
"StackWindows",
"Style",
"StyleDefinitionsOther",
"StyleOther",
"Subscript",
"SubsessionEvaluateCells",
"Superscript",
"SystemPrintOptionsDialog",
"Tab",
"TemplateSelection",
"TestEvaluateNotebook",
"TileWindowsTall",
"TileWindowsWide",
"ToggleAlignmentGuides",
"ToggleDebugFlag",
"ToggleDynamicUpdating",
"ToggleGrayBox",
"ToggleOptionListElement",
"ToggleShowExpression",
"ToggleTestingFlag",
"TrustNotebook",
"Undo",
"Ungroup",
"WelcomeDialog",
"WindowMiniaturize",
"XInfoDialog",
"ZoomWindow",
"$CellContext`inputnb$$",
"$CellContext`sourceNotebook$$"
}
Quoting John Fultz when he gave the list in Jan 2009:
The list is comparatively complete, excepting option names (which can also be used as tokens)
The MenuList tokens don't do anything. They're just menu placeholders. Here's something interesting you can do with them...
DynamicModule[{font}, Row[{PopupMenu[Dynamic[font], FE`Evaluate[FEPrivate`GetPopupList["MenuListFonts"]]], Spacer[20], Style["The quick brown fox", 20, FontFamily -> Dynamic[font]]}]]
FE`Evaluate[FEPrivate`GetPopupList[#]]&
returns values appropriate forPopupMenu
, and several FE interfaces take advantage of this, so it's unlikely to change in the future (although I wouldn't be surprised if such useful functionality makes its way into much simpler a top-level function some day).
Edit by Jacob
Let's call the list that was here before I made my edit originalList
. The list found by Vladimir (vladimirList
), contains most of the items in originalList
. The items that were in originalList
, but not in vladimirList
(Complement[originalList, vladimirList]
) are the following.
{"FrontEnd`ButtonNotebook[]","FrontEnd`EvaluationNotebook[]",
"FrontEnd`InputNotebook[]","FrontEnd`MessagesNotebook[]",
"FrontEnd`Private`nb",
"FrontEndToken[FrontEnd`ButtonNotebook[],\"HyperlinkGo\",`distance`]",
"$CellContext`inputnb$$","$CellContext`sourceNotebook$$"}
I am not sure how these items work and they seem to be different from other tokens. Probably reading the quote by John Fultz is a good first step towards understanding them.
The vladimirList
contains a lot of tokens that were not present in the original list. So great work by Vladimir. Even if you do not understand/like the "special tokens" that are in Complement[originalList, vladimirList]
, please realise that vladimirList
is not exhaustive anyway, as it also does contain
{"SelectNextExpression", "SelectPreviousExpression"};
This method only returns a few of them, hopefully including some undocumented ones. It's not intended to be a complete answer.
fnames = FileNames[
"*.nb" |
"*.tr", {FileNameJoin[{$InstallationDirectory, "SystemFiles",
"FrontEnd", "StyleSheets"}],
FileNameJoin[{$InstallationDirectory, "SystemFiles", "FrontEnd",
"TextResources"}],
FileNameJoin[{$InstallationDirectory, "SystemFiles", "FrontEnd",
"SystemResources"}]}, Infinity];
fimps = Import[#, "Text"] & /@ fnames;
DeleteDuplicates@
Flatten@StringCases[fimps,
Shortest[
"FrontEndToken[" ~~ (i___ /;
SameQ @@ (StringCount[i, #] & /@ {"[", "]"})) ~~ "]"]] //
StringReplace[#, Whitespace -> ""] & //
MakeExpression[#, StandardForm][[1, 1]] & /@ # & // DeleteDuplicates//Sort//Column
gives
{
{"AlignBottoms"},
{"AlignCentersHorizontally"},
{"AlignCentersVertically"},
{"AlignLeftSides"},
{"AlignRightSides"},
{"AlignTops"},
{"CellTagsFind"},
{"Clear"},
{"ClearCellOptions"},
{"DebuggerAbort"},
{"DebuggerContinue"},
{"DebuggerContinueToSelection"},
{"DebuggerFinish"},
{"DebuggerStep"},
{"DebuggerStepIn"},
{"DebuggerStepInBody"},
{"DebuggerStepOut"},
{"DebuggerToggleBreakpoint"},
{"DistributeBottoms"},
{"DistributeCentersHorizontally"},
{"DistributeCentersVertically"},
{"DistributeLeftSides"},
{"DistributeRightSides"},
{"DistributeSpaceHorizontally"},
{"DistributeSpaceVertically"},
{"DistributeTops"},
{"EvaluatorStart"},
{"FontPanel"},
{"FrontEndQuitNonInteractive"},
{"FrontEndToken[FrontEnd`ButtonNotebook[],\"HyperlinkGo\",`distance`]\
"},
{"GenerateImageCaches"},
{"GraphicsRender"},
{"Group"},
{"Import"},
{"MoveBackward"},
{"MoveForward"},
{"MoveToBack"},
{"MoveToFront"},
{"Open"},
{"OpenCloseGroup"},
{"OpenHelpLink"},
{"OptionsDialog"},
{"PreferencesDialog"},
{"PrintDialog"},
{"ScrollNotebookEnd"},
{"ScrollNotebookStart"},
{"SelectionSaveSpecial"},
{"SpellCheckerDialog"},
{"Style"},
{"Ungroup"},
{$CellContext`inputnb$$},
{FrontEnd`Private`nb},
{FrontEnd`ButtonNotebook[]},
{FrontEnd`EvaluationNotebook[]},
{FrontEnd`InputNotebook[]},
{FrontEnd`MessagesNotebook[]}
}
If it's about stuff that FrontEndExecute
can run, then Names["FrontEnd`*"]
and Names["FE`*"]
should give a big enough list not to paste in here, let alone Names["FrontEnd`*`*"]
and Names["FE`*`*"]
There is a list posted in 2009 from John Fultz on the MathGroup here.
No version information. Rojo's list has some new ones.
Length@RojosList
56
Length@JohnsList
266
Length@Intersection[RojosList, JohnsList]
35
Here is a combined list from belisarius' old answer of undocumented tokens given by John Fultz in Jan 2009, and tokens obtained from Mathematica system files. 80 of these were not listed in earlier answers. The list is obtained using Rojo's idea, but upgraded and corrected.
fnames = FileNames["*.nb" | "*.tr", {
FileNameJoin[{$InstallationDirectory, "SystemFiles", "FrontEnd",
"StyleSheets"}],
FileNameJoin[{$InstallationDirectory, "SystemFiles", "FrontEnd",
"TextResources"}],
FileNameJoin[{$InstallationDirectory, "SystemFiles", "FrontEnd",
"SystemResources"}]
}, Infinity];
fimps = Import[#, "Text"] & /@ fnames;
frontend = Flatten@ StringCases[fimps,
Shortest["FrontEndToken[\"" ~~ x__ ~~ "\""] -> x];
menuitems = DeleteDuplicates@Flatten@StringCases[fimps,
Shortest["Item[" ~~ (i___ /; SameQ @@ (StringCount[i, #] & /@ {"[", "]"})) ~~ "]"]];
menutokens = If[(d = StringPosition[#, "\", \""]) != {} && (d = d[[1, 1]]) == StringPosition[#, "\","][[1, 1]],
StringTake[#, {d + 4, StringPosition[#, "\""][[4, 1]] - 1}]] & /@ menuitems;
menutokens = Complement[menutokens, {Null}];
keyitems = DeleteDuplicates@Flatten@StringCases[fimps,
Shortest["Item[KeyEvent[" ~~ __ ~~ "]," ~~ Whitespace ~~ "\"" ~~ (i___ /; SameQ @@ (StringCount[i, #] & /@ {"[", "]"})) ~~ "\"]"]];
keyitems = Flatten@StringCases[keyitems, "Item[KeyEvent[" ~~ __ ~~ "]," ~~ Whitespace ~~ "\"" ~~ (x___ /; (StringCount[x, "\""] == 0)) ~~ "\"]" -> x];
l = frontend \[Union] menutokens \[Union] keyitems;
l // Sort // Column
The code finally gives more than two hundred tokens. Combined with the old list gives 360 in total:
AboutBoxDialog
Above
AlignBottoms
AlignCentersHorizontally
AlignCentersVertically
AlignLeftSides
AlignRightSides
AlignTops
AllWindowsFront
BackgroundDialog
Balance
Below
BringToFront
CellContextDialog
CellGroup
CellLabelsToTags
CellMerge
CellSplit
CellTagsEditDialog
CellTagsEmpty
CellTagsFind
CellUngroup
Clear
ClearCellOptions
ClearNoAutoScroll
Close
CloseAll
CloseMain
ColorSelectorDialog
ColorsPanel
CompleteSelection
Copy
CopyCell
CopySpecial
CreateCounterBoxDialog
CreateGridBoxDialog
CreateHyperlinkDialog
CreateInlineCell
CreateValueBoxDialog
Cut
CycleNotebooksBackward
CycleNotebooksForward
DebuggerAbort
DebuggerClearAllBreakpoints
DebuggerContinue
DebuggerContinueToSelection
DebuggerFinish
DebuggerResetProfile
DebuggerShowProfile
DebuggerStep
DebuggerStepIn
DebuggerStepInBody
DebuggerStepOut
DebuggerToggleBreakpoint
DebuggerToggleWatchpoint
DeleteBibAndNotes
DeleteBibReference
DeleteGeneratedCells
DeleteIndent
DeleteInvisible
DeleteNext
DeleteNextExpression
DeletePrevious
DeletePreviousWord
DistributeBottoms
DistributeCentersHorizontally
DistributeCentersVertically
DistributeLeftSides
DistributeRightSides
DistributeSpaceHorizontally
DistributeSpaceVertically
DistributeTops
DuplicatePreviousInput
DuplicatePreviousOutput
EditBibNote
EditStyleDefinitions
EnterSubsession
Evaluate
EvaluateCells
EvaluateInitialization
EvaluateNextCell
EvaluateNotebook
EvaluatorAbort
EvaluatorHalt
EvaluatorInterrupt
EvaluatorQuit
EvaluatorStart
ExitSubsession
ExpandSelection
ExpirationDialog
ExplainBeepDialog
ExplainColoringDialog
ExpressionLinewrap
FileNameDialog
FindDialog
FindEvaluatingCell
FindNextMatch
FindNextMisspelling
FindNextWarningColor
FindPreviousMatch
FinishNesting
FixCellHeight
FixCellWidth
FontColorDialog
FontFamilyB
FontPanel
FontSizeDialog
Fraction
FrontEndHide
FrontEndQuit
FrontEndQuitNonInteractive
GenerateImageCaches
GenerateNotebook
GeneratePalette
GraphicsAlign
GraphicsBoxOptionsImageSize
GraphicsCoordinatesDialog
GraphicsOriginalSize
GraphicsPlotRangeAll
GraphicsPlotRangeAutomatic
GraphicsPlotRangeFixed
GraphicsRender
Group
HandleShiftReturn
HeadersFootersDialog
HelpDialog
HyperlinkGo
HyperlinkGoBack
HyperlinkGoForward
ImageToAutomatic
ImageToBinary
ImageToBit
ImageToBit16
ImageToByte
ImageToCMYK
ImageToggleAlphaChannel
ImageToggleInterleaving
ImageToGrayscale
ImageToHSB
ImageToReal
ImageToReal32
ImageToRGB
Import
ImportPictures
ImportStyleDefinitions
Indent
InsertBibAndNotes
InsertBibNote
InsertBibReference
InsertClipPlane
InsertMatchingBraces
InsertMatchingBrackets
InsertMatchingParentheses
InsertNewGraphic
InsertObject
InsertRawExpression
InsertSoftReturn
InsertSplitBreak
LicAuthFailureDialog
Linebreak
MacintoshOpenDeskAccessory
MakeSelectionNotSpan
MakeSelectionSpan
MenuListBoxFormFormatTypes
MenuListCellEvaluators
MenuListCellTags
MenuListCommonDefaultFormatTypesInput
MenuListCommonDefaultFormatTypesInputInline
MenuListCommonDefaultFormatTypesOutput
MenuListCommonDefaultFormatTypesOutputInline
MenuListCommonDefaultFormatTypesText
MenuListCommonDefaultFormatTypesTextInline
MenuListConvertFormatTypes
MenuListDisplayAsFormatTypes
MenuListExportClipboardSpecial
MenuListFonts
MenuListFontSubstitutions
MenuListGlobalEvaluators
MenuListHelpWindows
MenuListNotebookEvaluators
MenuListNotebooksMenu
MenuListPackageWindows
MenuListPalettesMenu
MenuListPaletteWindows
MenuListPlayerWindows
MenuListPlugInCommands
MenuListPrintingStyleEnvironments
MenuListQuitEvaluators
MenuListRelatedFilesMenu
MenuListSaveClipboardSpecial
MenuListScreenStyleEnvironments
MenuListStartEvaluators
MenuListStyleDefinitions
MenuListStyles
MenuListStylesheetWindows
MenuListTextWindows
MenuListWindows
ModifyBoxFormFormatTypes
ModifyDefaultFontProperties
ModifyEvaluatorNames
ModifyFontSubstitutions
ModifyNotebooksMenu
ModifyRelatedFiles
MoveBackward
MoveExpressionEnd
MoveForward
MoveLineBeginning
MoveLineEnd
MoveNext
MoveNextCell
MoveNextExpression
MoveNextLine
MoveNextPlaceHolder
MoveNextWord
MovePrevious
MovePreviousExpression
MovePreviousLine
MovePreviousPlaceHolder
MovePreviousWord
MoveToBack
MoveToFront
New
NewCDFNotebook
NewColumn
NewPackage
NewRow
NewText
NextFunctionTemplate
NotebookMail
NotebookMailSelection
NotebookOneNote
NotebookOneNoteSelection
NotebookStatisticsDialog
NudgeDown
NudgeLeft
NudgeRight
NudgeUp
Open
OpenCloseGroup
OpenFromNotebooksMenu
OpenFromNotebooksMenuEmpty
OpenFromPalettesMenu
OpenFromRelatedFilesMenu
OpenHelpLink
OpenSelection
OpenSelectionParents
OpenURL
OptionsDialog
Otherscript
PasswordDialog
Paste
PasteApply
PasteApplyNoAutoScroll
PasteDiscard
PasteDiscardNoAutoScroll
PasteSpecial
Placeholder
PlainFont
PreferencesDialog
PreviousFunctionTemplate
PrintDialog
PrintOptionsDialog
PrintSelectionDialog
PublishToPlayer
Radical
RebuildBibAndNotes
RebuildHelpIndex
RecordSoundDialog
RefreshDynamicObjects
RelatedFilesMenu
RemoveAdjustments
RemoveFromEvaluationQueue
Replace
ReplaceAll
ReplaceFind
ReplaceParent
ResetDefaultsText
ReverseQuote
Revert
RunColorDialog
RunEdgeColorDialog
RunFaceColorDialog
Save
SaveRename
SaveRenameSpecial
ScrollLineDown
ScrollLineUp
ScrollNotebookEnd
ScrollNotebookStart
ScrollPageBottom
ScrollPageDown
ScrollPageFirst
ScrollPageLast
ScrollPageNext
ScrollPagePrevious
ScrollPageTop
ScrollPageUp
SelectAll
SelectGeneratedCells
SelectionAnimate
SelectionBrace
SelectionBracket
SelectionCloseAllGroups
SelectionCloseUnselectedCells
SelectionConvert
SelectionConvertB
SelectionDisplayAs
SelectionDisplayAsB
SelectionHelpDialog
SelectionOpenAllGroups
SelectionParenthesize
SelectionSaveSpecial
SelectionScroll
SelectionSetFind
SelectionSpeak
SelectionSpeakSummary
SelectionUnbracket
SelectLineBeginning
SelectLineEnd
SelectNext
SelectNextLine
SelectNextWord
SelectNotebookWindow
SelectPrevious
SelectPreviousLine
SelectPreviousWord
ServerText
SetCitationStyle
SetDefaultGraphic
ShortNameDelimiter
SimilarCellBelow
SoundPlay
SpellCheckerDialog
StackWindows
Style
StyleDefinitionsOther
StyleOther
Subscript
SubsessionEvaluateCells
Superscript
SystemPrintOptionsDialog
Tab
TemplateSelection
TestEvaluateNotebook
TileWindowsTall
TileWindowsWide
ToggleAlignmentGuides
ToggleDebugFlag
ToggleDynamicUpdating
ToggleGrayBox
ToggleOptionListElement
ToggleShowExpression
ToggleTestingFlag
TrustNotebook
Undo
Ungroup
WelcomeDialog
WindowMiniaturize
XInfoDialog
ZoomWindow
To make a token use the function FrontEndToken["Name"]
I scraped all the possible FrontEndToken[___]
and FrontEndTokenExecute[___]
data possible (I think) from the notebooks and packages in the installation directory and I have a few things that have clearly been added since the list was last updated. I won't post the entire list I found as most of that stuff is guide references and titles but there are a few fun finds.
First there's the new way to open the find dialog (in the lists provided it is FindDialog
but that seems not to work. What does work in 11 in FindExpression
.
Also this method provides usage data so I found that you can use the Style
token to basically cell print a new cell with that style.
e.g. FrontEndTokenExecute[nb:_NotebookObject:InputNotebook[],"Style",stylename_]
to cell print a cell of that style. This is almost certainly how the "Style"
menu does its thing.
There's also the Toggle
token that toggles settings, like bold text: FrontEndTokenExecute[InputNotebook[], "FontWeight", Toggle]
the same thing exists for {"FontWeight", "FontSlant", "FontVariationsUnderline", "FontSize"}
it seems.
It can also be used as a general options setter via, for example, FrontEndTokenExecute[InputNotebook[], "CellFrame", {{1, 1}, {1, 1}}]
which sets the cell frame. I also found "WholeCellGroupOpener"
and "CellFrameColor"
although things like "ShowGroupOpener"
also work. Basically the front end can set any cell option via a token. Not too surprising, but worth knowing.
What I ended up finding that is, I think, not on any of the previous lists is this:
{"Background", "CellFrame", "CellFrameColor", "ClearCropMarker",
"ClearMaskMarkers", "ClearMultiSelMarkers", "ClearPixelPointMarkers",
"FindExpression", "FontSize", "FontSlant", "FontVariationsUnderline",
"FontWeight", "GlobalPreferences", "LicenseAgreementDialog",
"NotebookSecurity", "OpenCloudObject", "SelectNextCell",
"SelectPreviousCell", "WholeCellGroupOpener", "WolframCloudLogout"}
Most of these are style options/toggle values and the Clear*
family seem to throw errors generally (the way they are used is FrontEndTokenExecute[token]
).
OpenCloudObject
and WolframCloudLogout
are both used with FrontEndTokenExecute
although the WolframCloudLogout
seems to take a second boolean argument (False
in whatever source file it came from)
{"GlobalPreferences", "NotebookSecurity"}
are just options dialogs (used with "OptionsDialog".
Beware of LicenseAgreementDialog
as it just opens a license agreement that quits Mathematica altogether if you close the window. Not useful.
In fact the only real finds here are SelectNextCell
and SelectPreviousCell
which I think need no explanation.
Since I have the usage data, why not post it here? Each of these is just a sample usage. For many of these keys there were multiple usage entries. Note that there are tons of tokens missing from this. Almost certainly I just missed some files in scraping or the "HeldExpressions"
package element couldn't be imported.
"AlignBottoms"->Hold[FrontEndToken["AlignBottoms"]],
"AlignCentersHorizontally"->Hold[FrontEndToken["AlignCentersHorizontally"]],
"AlignCentersVertically"->Hold[FrontEndToken["AlignCentersVertically"]],
"AlignLeftSides"->Hold[FrontEndToken["AlignLeftSides"]],
"AlignRightSides"->Hold[FrontEndToken["AlignRightSides"]],
"AlignTops"->Hold[FrontEndToken["AlignTops"]],
"BackgroundDialog"->Hold[FrontEndToken[InputNotebook[],"BackgroundDialog"]],
"Balance"->Hold[FrontEndToken[InputNotebook[],"Balance"]],
"CellFrameColor"->Hold[FrontEndToken[InputNotebook[],"CellFrameColor",MEpalette`cellFrameColorSelection]],
"CellGroup"->Hold[FrontEndToken[InputNotebook[],"CellGroup"]],
"CellMerge"->Hold[FrontEndToken[InputNotebook[],"CellMerge"]],
"CellSplit"->Hold[FrontEndToken[InputNotebook[],"CellSplit"]],
"CellUngroup"->Hold[FrontEndToken[InputNotebook[],"CellUngroup"]],
"ClearCropMarker"->Hold[FrontEndTokenExecute["ClearCropMarker"]],
"ClearMaskMarkers"->Hold[FrontEndTokenExecute["ClearMaskMarkers"]],
"ClearMultiSelMarkers"->Hold[FrontEndTokenExecute["ClearMultiSelMarkers"]],
"ClearPixelPointMarkers"->Hold[FrontEndTokenExecute["ClearPixelPointMarkers"]],
"CloseAll"->Hold[FrontEndTokenExecute["CloseAll",False]],
"CompleteSelection"->Hold[FrontEndToken[InputNotebook[],"CompleteSelection"]],
"CreateHyperlinkDialog"->Hold[FrontEndTokenExecute[nb,"CreateHyperlinkDialog"]],
"CreateInlineCell"->Hold[FrontEndToken[InputNotebook[],"CreateInlineCell"]],
"Cut"->Hold[FrontEndToken["Cut"]],
"DeleteNext"->Hold[FrontEndToken[InputNotebook[],"DeleteNext"]],
"DeletePrevious"->Hold[FrontEndToken[InputNotebook[],"DeletePrevious"]],
"DistributeBottoms"->Hold[FrontEndToken["DistributeBottoms"]],
"DistributeCentersHorizontally"->Hold[FrontEndToken["DistributeCentersHorizontally"]],
"DistributeCentersVertically"->Hold[FrontEndToken["DistributeCentersVertically"]],
"DistributeLeftSides"->Hold[FrontEndToken["DistributeLeftSides"]],
"DistributeRightSides"->Hold[FrontEndToken["DistributeRightSides"]],
"DistributeSpaceHorizontally"->Hold[FrontEndToken["DistributeSpaceHorizontally"]],
"DistributeSpaceVertically"->Hold[FrontEndToken["DistributeSpaceVertically"]],
"DistributeTops"->Hold[FrontEndToken["DistributeTops"]],
"DuplicatePreviousInput"->Hold[FrontEndToken["DuplicatePreviousInput"]],
"DuplicatePreviousOutput"->Hold[FrontEndToken["DuplicatePreviousOutput"]],
"EvaluateCells"->Hold[FrontEndToken[InputNotebook[],"EvaluateCells"]],
"EvaluateNextCell"->Hold[FrontEndToken[InputNotebook[],"EvaluateNextCell"]],
"EvaluatorQuit"->Hold[FrontEndTokenExecute["EvaluatorQuit"]],
"FindExpression"->Hold[FrontEndToken["FindExpression"]],
"FindNextMisspelling"->Hold[FrontEndToken["FindNextMisspelling"]],
"FontColorDialog"->Hold[FrontEndToken[InputNotebook[],"FontColorDialog",Automatic]],
"FontSlant"->Hold[FrontEndToken[InputNotebook[],"FontSlant",Toggle]],
"FontVariationsUnderline"->Hold[FrontEndToken[InputNotebook[],"FontVariationsUnderline",Toggle]],
"FontWeight"->Hold[FrontEndToken[InputNotebook[],"FontWeight",Toggle]],
"Fraction"->Hold[FrontEndToken[InputNotebook[],"Fraction"]],
"FrontEndQuitNonInteractive"->Hold[FrontEndTokenExecute["FrontEndQuitNonInteractive"]],
"GlobalPreferences"->Hold[FrontEndToken["OptionsDialog","","GlobalPreferences"]],
"Group"->Hold[FrontEndToken["Group"]],
"LicenseAgreementDialog"->Hold[FrontEndTokenExecute["LicenseAgreementDialog"]],
"Linebreak"->Hold[FrontEndToken[InputNotebook[],"Linebreak"]],
"MoveBackward"->Hold[FrontEndToken["MoveBackward"]],
"MoveForward"->Hold[FrontEndToken["MoveForward"]],
"MoveLineBeginning"->Hold[FrontEndToken[InputNotebook[],"MoveLineBeginning"]],
"MoveLineEnd"->Hold[FrontEndToken[InputNotebook[],"MoveLineEnd"]],
"MoveNextLine"->Hold[FrontEndToken[FrontEnd`ButtonNotebook[],"MoveNextLine"]],
"MoveNextWord"->Hold[FrontEndToken[InputNotebook[],"MoveNextWord"]],
"MovePreviousWord"->Hold[FrontEndToken[InputNotebook[],"MovePreviousWord"]],
"MoveToBack"->Hold[FrontEndToken["MoveToBack"]],
"MoveToFront"->Hold[FrontEndToken["MoveToFront"]],
"NewColumn"->Hold[FrontEndToken["NewColumn"]],
"NewRow"->Hold[FrontEndToken["NewRow"]],
"NotebookSecurity"->Hold[FrontEndTokenExecute["OptionsDialog","NotebookSecurity"]],
"Open"->Hold[FrontEndTokenExecute["Open"]],
"OpenCloudObject"->Hold[FrontEndTokenExecute["OpenCloudObject"]],
"Paste"->Hold[FrontEndToken["Paste"]],
"PrintDialog"->Hold[FrontEndTokenExecute["PrintDialog"]],
"RebuildHelpIndex"->Hold[FrontEndTokenExecute["RebuildHelpIndex"]],
"ScrollPageFirst"->Hold[FrontEndToken[FrontEnd`InputNotebook[],"ScrollPageFirst"]],
"ScrollPageLast"->Hold[FrontEndToken[FrontEnd`InputNotebook[],"ScrollPageLast"]],
"SelectNextCell"->Hold[FrontEndToken[nb,"SelectNextCell"]],
"SelectPrevious"->Hold[FrontEndToken[nb,"SelectPrevious"]],
"SelectPreviousCell"->Hold[FrontEndToken[nbobj,"SelectPreviousCell"]],
"ShortNameDelimiter"->Hold[FrontEndToken[InputNotebook[],"ShortNameDelimiter"]],
"Superscript"->Hold[FrontEndToken[InputNotebook[],"Superscript"]],
"TemplateSelection"->Hold[FrontEndToken[InputNotebook[],"TemplateSelection"]],
"Text"->Hold[FrontEndToken[InputNotebook[],"Style","Text"]],
"Ungroup"->Hold[FrontEndToken["Ungroup"]],
"WholeCellGroupOpener"->Hold[FrontEndToken[InputNotebook[],"WholeCellGroupOpener",!AbsoluteCurrentValue[NotebookSelection[InputNotebook[]],"WholeCellGroupOpener"]]],
"WolframCloudLogout"->Hold[FrontEndTokenExecute["WolframCloudLogout",False]]
ExportPacket[___, "PlainText"]
or FE`makePlainText
followed by a CopyToClipboard
.
$\endgroup$
\r\n
in place of \n
while direct menu copy as and paste don't.
$\endgroup$
MenuSetup
token is FrontEnd`CopySpecial["PlainText"]
it seems. But it turns out that isn't a real packet. So I'm guessing they're using an ExportPacket
plus a FE-copy. But I don't really know.
$\endgroup$
\r
manually :)
$\endgroup$
This is not a proper answer. Rather, it provides some tools to handle the lists of tokens in other answers.
Let
jacobList = {"SelectNextExpression", "SelectPreviousExpression"};
I used the code below to merge the lists by belisarius (originalList
), Vladimir (vladimirList
) and myself (jacobList
).
You can set vladimirList = l
, where l
is defined in Vladimir's answer.
After executing the code, there is a string on the clipboard that is will be a nicely formatted code block on this site.
CopyToClipboard@
StringJoin[
Append[Prepend[
Riffle[ToString[#, InputForm] & /@
Union[vladimirList, originalList, jacobTokenStrings],
",\n "], " {\n "], "\n }"]]
Text to list (perhaps a bit silly)
Vladimir provides a list in a code block. In order to turn this into a proper List
, take the following steps (as an alternative to just evaluating his code).
First, copy the contents of the code block.
Then, execute the following code in one cell
(*Depends on having the right data on the clipboard*)
Cell["", "Text", CellTags -> "vladimir"] // CellPrint
SelectionMove[EvaluationNotebook[], Before, CellContents]
Paste[]
Block[{vladimirCell},
vladimirCell = Cells[CellTags -> "vladimir"] // First;
vladimirList =
StringSplit[NotebookRead[vladimirCell][[1]], (" " | "\n") ..];
NotebookDelete[vladimirCell]
]
CurrentValue
, mathematica.stackexchange.com/questions/1379, would probably be a good starting point. Of course in this case you won't want to limit the files to.nb
s. $\endgroup$