({{, (RefLink[FrontEndToken, paclet:ref/FrontEndToken])["cmd"] 
is an object that represents a front end command token, typically corresponding to a front end menu item, to be executed by (RefLink[FrontEndExecute, paclet:ref/FrontEndExecute]). }, {, (RefLink[FrontEndToken, paclet:ref/FrontEndToken])[nb,"cmd"]
represents a command that targets the specified notebook. }, {, (RefLink[FrontEndToken, paclet:ref/FrontEndToken])[nb,"cmd",param]
represents a command with a parameter.}})

OpenersNotesSection(Spacer1)Details

Typical tokens corresponding to menu items without parameters include: (StringTypeLink["Open", paclet:ref/frontendobject/Open]), (StringTypeLink["Paste", paclet:ref/frontendobject/Paste]), "SpellCheckerDialog", (StringTypeLink["StackWindows", paclet:ref/frontendobject/StackWindows]), (StringTypeLink["Fraction", paclet:ref/frontendobject/Fraction]), (StringTypeLink["OpenCloseGroup", paclet:ref/frontendobject/OpenCloseGroup]), (StringTypeLink["EvaluateCells", paclet:ref/frontendobject/EvaluateCells]), (StringTypeLink["EvaluateInitialization", paclet:ref/frontendobject/EvaluateInitialization]).

Typical tokens with associated parameters include: "Style", (StringTypeLink["SelectionConvert", paclet:ref/frontendobject/SelectionConvert]), (StringTypeLink["EvaluatorQuit", paclet:ref/frontendobject/EvaluatorQuit]).

The mapping between command tokens and menu items or keyboard shortcuts is defined in front end text resource files.

OpenersPrimaryExamplesSection(Spacer1)Examples  (3)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Create a notebook with two cells:

nb=CreateDocument[{"line1","line2"}];

SelectionMove[nb,All,Notebook]

Merge the cells by using a (RefLink[FrontEndToken, paclet:ref/FrontEndToken]):

FrontEndExecute[FrontEndToken[nb,"CellMerge"]]

OpenersExampleSection1(Spacer1)Scope  (2)

Open a document:

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

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[FrontEndExecute, paclet:ref/FrontEndExecute])  ▪  (RefLink[FrontEndTokenExecute, paclet:ref/FrontEndTokenExecute])  ▪  (RefLink[SystemDialogInput, paclet:ref/SystemDialogInput])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Front End Tokens, paclet:tutorial/FrontEndTokens])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Programmatic Notebook & Interface Customization, paclet:guide/ProgrammaticNotebookAndInterfaceCustomization])}})}})