[RoutineDef,SetBoolean,
[VarSet,activST,[SubToolGetActiveIndex]]
[ISet,Tool:Sub Tool:SubTool ScrollBar,0,([SubToolGetCount]-(activST+1))]
[VarSet,stPath,"Tool:Sub Tool 0"]
[VarSet,bWidth,[IWidth,#stPath]]
[VarSet,bHeight,7]
[Loop,1,
[If,(md&1 == 1),//make sure START is on
[If,([IModGet,"Tool:Sub Tool 0"]&1 != 1),
[IClick,#stPath,bWidth-117,bHeight]
,//else turn off if necessary
[If,([IModGet,"Tool:Sub Tool 0"]&1 == 1),
[IClick,#stPath,bWidth-117,bHeight]
[If,(md&2 == 2),//make sure Addition is on
[If,([IModGet,"Tool:Sub Tool 0"]&2 != 2),
[IClick,#stPath,bWidth-96,bHeight]
[If,(md&4 == 4),//make sure Subtraction is on
[If,([IModGet,"Tool:Sub Tool 0"]&4 != 4),
[IClick,#stPath,bWidth-75,bHeight]
[If,(md&8 == 8),//make sure Intersection is on
[If,([IModGet,"Tool:Sub Tool 0"]&8 != 8),
[IClick,#stPath,bWidth-54,bHeight]
]//end loop
,md]//Boolean mode: 1 = START, 2 = Addition, 4 = Subtraction, 8 = Intersection