1. #1
    New Member Follow User Gallery
    Join Date
    Mar 2017
    Posts
    3

    Default Question: visible subtools?

    Hello guys,

    I'm just starting zscript, and I have a question. I would like to operate an action only on visible subtools. Is there any commands to do that ?

    I was thinking to make a condition
    [loop,
    [If, [xxxx]//if the subtool is visible
    [ISet,Tool:Geometry:SDiv,4]
    , [IPress,Tool:SubTool:SelectDown] //and check the second one
    ]
    ]
    I just miss the 'xxxx' part
    Thank you in advance for your help !

  2. #2
    Moderator Follow User Gallery
    Join Date
    Jun 2004
    Location
    UK
    Posts
    11,462

    Default

    You can use [IModGet] to test if a subtool is visible or not:

    [IButton,"Test All","Test SubTool Visibility",
    [VarSet,activST,[SubToolGetActiveIndex]]
    [Loop,[SubToolGetCount],
    [SubToolSelect,[Val,n]]
    [VarSet,STname,[IGetTitle,Tool:ItemInfo]]
    [VarSet,STname,[StrExtract,STname,0,[StrLength,STname]-2]]
    [If,[IModGet,[StrMerge,"Tool:Sub Tool:",STname]]>=16,
    [Note,[StrMerge,"SubTool #",[Val,n]," is VISIBLE"],,1]
    ,
    [Note,[StrMerge,"SubTool #",[Val,n]," is HIDDEN"],,1]
    ]
    ,n]
    [SubToolSelect,activST]
    ]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •