FrontEndToken["cmd"]
is an object that represents a front end command token, typically corresponding to a front end menu item, to be executed by FrontEndExecute.
FrontEndToken[nb,"cmd"]
represents a command that targets the specified notebook.
FrontEndToken[nb,"cmd",param]
represents a command with a parameter.
FrontEndToken
FrontEndToken["cmd"]
is an object that represents a front end command token, typically corresponding to a front end menu item, to be executed by FrontEndExecute.
FrontEndToken[nb,"cmd"]
represents a command that targets the specified notebook.
FrontEndToken[nb,"cmd",param]
represents a command with a parameter.
Details
- Typical tokens corresponding to menu items without parameters include: "Open", "Paste", "SpellCheckerDialog", "StackWindows", "Fraction", "OpenCloseGroup", "EvaluateCells", "EvaluateInitialization".
- Typical tokens with associated parameters include: "Style", "SelectionConvert", "EvaluatorQuit".
- The mapping between command tokens and menu items or keyboard shortcuts is defined in front end text resource files.
Examples
open all close allBasic Examples (1)
Create a notebook with two cells:
nb = CreateDocument[{"line1", "line2"}];SelectionMove[nb, All, Notebook]Merge the cells by using a FrontEndToken:
FrontEndExecute[FrontEndToken[nb, "CellMerge"]]Scope (2)
file = FileNameJoin[{$InstallationDirectory, "Documentation", "English", "System", "ExampleData", "document.nb"}];nb = NotebookOpen[file];Use a token to move the insertion point:
FrontEndExecute[FrontEndToken[nb, "MoveNextLine"]]FrontEndExecute[Table[FrontEndToken[nb, "MoveNext"], {3}]]Use a token to select all of the document:
FrontEndExecute[FrontEndToken[nb, "SelectAll"]]Use a token to close all cell groups in the selection:
FrontEndExecute[FrontEndToken[nb, "SelectionCloseAllGroups"]]Use a front end token to tile notebook windows:
FrontEndExecute[FrontEndToken[nb, "TileWindowsTall"]]Tech Notes
Related Guides
History
Introduced in 1996 (3.0)
Text
Wolfram Research (1996), FrontEndToken, Wolfram Language function, https://reference.wolfram.com/language/ref/FrontEndToken.html.
CMS
Wolfram Language. 1996. "FrontEndToken." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FrontEndToken.html.
APA
Wolfram Language. (1996). FrontEndToken. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FrontEndToken.html
BibTeX
@misc{reference.wolfram_2026_frontendtoken, author="Wolfram Research", title="{FrontEndToken}", year="1996", howpublished="\url{https://reference.wolfram.com/language/ref/FrontEndToken.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_frontendtoken, organization={Wolfram Research}, title={FrontEndToken}, year={1996}, url={https://reference.wolfram.com/language/ref/FrontEndToken.html}, note=[Accessed: 12-June-2026]}