Menus

Sjoerd Op 't Land sjoerdoptland at mac.com
Fri Feb 15 10:40:19 EST 2002


Robert Presender wrote/ schreef:

> Hi,
> I want to determine the number of menu items of a particular menu by script
> but have been unable to find a Transcript syntax that will do it. ( Mac OS
> 9.2.2, RR 1.1/1.1.1b1)
I assume that your talking about the menus of the RunRev IDE. Then an
expression like:
  put button "File" of group "revMenubar" of stack "revMenuBar"
Will result in (try to type this in the Message Box):
-----------------------
&New Mainstack
(&New Substack
&Open Stack.../O
Open Recent &Stack
    (None Found
(&Close/W
(Close and Remove From Memor&y...
-
(Import As Control
    Image File.../>
    Snapshot
    Audio File...
    Video File...
    Text File...
    (EPS File...
    -
    All Images In Folder...
    All Audio Files In Folder...
(New Referenced Control
    Image File...
    Quicktime-Supported File...
    -
    All Images In Folder...
-
(&Save/S
(Save &As...
(Move S&ubstack to File...
(&Revert to Saved...
-
Build Distribution...
-
P&age Setup...
(&Print Card.../P
(Print Field...
-
&Quit/Q
-----------------------

And an expression like:
  put the number of lines in button "File" of group "revMenubar" of stack
"revMenuBar"

Will result in the number of menuItem (also the nested ones, the
'subItems'). You may want to filter them and/or the separators, '-', out,
but this is the basic.

> Will appreciate any help.
> 
> Regards ... Bob
Regards, / Groeten,
Sjoerd




More information about the use-livecode mailing list