Class Menu : doesItemExist Method


Boolean doesItemExist( String strName )

Summary

Determine whether a menu, or menu item, exists.


Parameters

ParameterDescription
String strName The name of the item you wish to check.


Examples

Short example to test the function:

var menuMain = app.getMainMenu();
var menuTools = menuMain.getMenu( "&Tools" );
if( !menuTools )
{
alert( "Test needs to be updated for changed menu names" );
}
else
{
if( !menuTools.doesItemExist( "Cus&tomise..." ) )
{
alert( "We ought to have found 'Cus&tomise...' sub menu" );
}

if( !menuMain.doesItemExist( "&Tools" ) )
{
alert( "We ought to have found '&Tools'" );
}

if( menuMain.doesItemExist( "Bleh!" ) )
{
alert( "We ought not to have found Bleh!" );
}

}


See Also

  • MarkerMenu : doesItemExist


    Requirements

    1110