window.isMenuScript

Syntax window.isMenuscript (title)

Params title is the name of the window you want to check to see if it is a menu script window.

Action Determine if the window contains a menu bar script.

Returns True if the window contains a menu bar script, false otherwise.

Examples Open the Frontier Menu Bar with the button in the Main Window, by pressing Command-M or by choosing "Menu Bar Editor" from the UserLand menu. Now type and execute:
window.isMenuScript ("system.misc.menubar" )


   » false // The menu bar editor is open but not a script.

Now open the script of any object on the menu bar and execute:
window.isMenuScript (window.frontmost ())

true

Discuss