Flag on subMenu item

Hi guys

I'm currently having a little issue with my script.
I have create a subMenu in the main menu bar with some actionItem in.
I'd like to know how you can get the flag that came in front of the item, letting me know if the action item is executed or not (for example the dialog is open (flag on) or close (flag off))...

To know what I'm searching for, you can take a look at the attachment

thanks in advance
Cheers, SugaR

AttachmentSize
flag_submenu_item.jpg79.67 KB

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
artrender.info's picture

thx for this

but how would you add just text there? is this rcmenu?

AttachmentSize
rcmenu.jpg 12.88 KB
barigazy's picture

you can't. But you can always

you can't. But you can always create custom ContextMenu :)

barigazy

SugaR's picture

Nevermind guys, I just find

Nevermind guys, I just find the solution.

For those who need this, here is a short example (the menuItem lunch or close a dialog in this case)

macroScript test category:"Test" --define the macroscript lunch by the menuItem
(
local isOpen = false
on execute do
(
if isOpen then --if open, close it
(
destroyDialog test
isOpen = false--and lower the flag
)
else --if closed, open it
(
fileIn "$userscripts/test.ms"--include the script
isOpen = true --and raise the flag
)
)
on isChecked return isOpen --return the flag
)

Cheers,
SugaR

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.