Menubar.IsMenuCommandChecked
----------------------------

Checks if a menubar item is checked.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Menubar](component_Menubar.md) | [6.3](newinversion63.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "Menubar.IsMenuCommandChecked"; Path ) 

**MBS**( **"Menubar.IsMenuCommandChecked";** /\* Checks if a menubar item is checked. \*/  
**$Path**) /\* The ID or path to the menu entry.  
Use [Menubar.ListMenuCommands](MenubarListMenuCommands.md) to find out the IDs and names.e.g. 49297 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Path | The ID or path to the menu entry.   Use [Menubar.ListMenuCommands](MenubarListMenuCommands.md) to find out the IDs and names. | 49297 |

### Result

Returns 0, 1 or error.

### Description

Checks if a menubar item is checked.  
Returns 1 if the menubar has a checkmark.  
### Examples

Checks if debugger is visible:

 MBS ( "Menubar.IsMenuCommandChecked"; 49260)  
Show debugger from within a script:

 #The menu command as we got it from [Menubar.ListMenuCommands](MenubarListMenuCommands.md)  
Set Variable \[$DebuggerMenuID ; Value:49260\]  
If \[MBS ( "[Menubar.HasMenuCommand](MenubarHasMenuCommand.md)"; $DebuggerMenuID ) = 1\]  
 If \[MBS ( "Menubar.IsMenuCommandChecked"; $DebuggerMenuID ) = 1\]  
 #debugger already visible  
 Else  
 #show debugger  
 Set Variable \[$r ; Value:MBS ( "[Menubar.RunMenuCommand](MenubarRunMenuCommand.md)"; $DebuggerMenuID )\]  
 Pause/Resume Script \[Duration (seconds): ,1\]  
 End If  
Else  
 Show Custom Dialog \["Debugger missing in Menubar?"\]  
End If  
\#now follows your script that should always run in debugger   
Whether the formatting bar is checked in menu bar:

 Set Variable \[ $formattingBarChecked ; Value: MBS ( "Menubar.IsMenuCommandChecked"; "50204" ) \]  
### See also

- [Menubar.HasMenuCommand](MenubarHasMenuCommand.md)
- [Menubar.ListMenuCommands](MenubarListMenuCommands.md)
- [Menubar.RunMenuCommand](MenubarRunMenuCommand.md)

### Blog Entries

- [Is there a formatting bar?](https://www.mbsplugins.de/archive/2024-07-08/Is_there_a_formatting_bar/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 6.3pr3](https://www.mbsplugins.de/archive/2016-06-19/MBS_FileMaker_Plugin_version_6/monkeybreadsoftware_blog_filemaker)
- [Tip of the day: Show debugger in FileMaker from within a script](https://www.mbsplugins.de/archive/2016-06-17/Tip_of_the_day_Show_debugger_i/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 17th June 2016 , last changed 28th June 2024

  
[Menubar.HasMenuCommand](MenubarHasMenuCommand.md) - [Menubar.ListMenuCommands](MenubarListMenuCommands.md)

[HTML Version](MenubarIsMenuCommandChecked.shtml)