MenuItem.GetScriptFileName
--------------------------

Queries which file contains the script to be run if menu item is selected.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Menu](component_Menu.md) | [4.1](newinversion41.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |

MBS( "MenuItem.GetScriptFileName"; Item ) 

**MBS**( **"MenuItem.GetScriptFileName";** /\* Queries which file contains the script to be run if menu item is selected. \*/  
**$Item**) /\* The reference to the menu item. Please create one with [MenuItem.CreateMenuItem](MenuItemCreateMenuItem.md) or [MenuItem.CreateSeparator](MenuItemCreateSeparator.md). \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Item | The reference to the menu item. Please create one with [MenuItem.CreateMenuItem](MenuItemCreateMenuItem.md) or [MenuItem.CreateSeparator](MenuItemCreateSeparator.md). | $item |

### Result

Returns file name or error.

### Description

Queries which file contains the script to be run if menu item is selected.  
### See also

- [HotKey.GetScriptFileName](HotKeyGetScriptFileName.md)
- [Menu.GetScriptFileName](MenuGetScriptFileName.md)
- [MenuItem.CreateMenuItem](MenuItemCreateMenuItem.md)
- [MenuItem.CreateSeparator](MenuItemCreateSeparator.md)
- [MenuItem.GetScriptName](MenuItemGetScriptName.md)
- [MenuItem.SetScriptAction](MenuItemSetScriptAction.md)

This function is free to use.

Created 18th August 2014 , last changed 31st August 2014

  
[MenuItem.GetRequireShift](MenuItemGetRequireShift.md) - [MenuItem.GetScriptName](MenuItemGetScriptName.md)

[HTML Version](MenuItemGetScriptFileName.shtml)