You need to simulate a click in the right part of the subtool list in order to turn the option on or off. You can get the Mod value by using [IModGet] and then set the option you want. You can use & (as bitwise AND) to check the values, as they are all added together depending on if the subtool is visible etc. The code below shows the method. (Note that this code just works on the selected subtool and it is only a snippet to show how it’s done.)
[IButton,“Set Add”,
[VarSet,subtoolPath,[StrMerge,“Tool:Subtool:”,[IGetTitle,“Tool:Current Tool”]]]
[If,(1 & [IModGet,subtoolPath]) != 1,
[VarSet,wid,[IWidth,subtoolPath]]
[IClick,subtoolPath,wid-100,5] //click the right part of the subtool entry
]
]
[IButton,“Set Subtract”,
[VarSet,subtoolPath,[StrMerge,“Tool:Subtool:”,[IGetTitle,“Tool:Current Tool”]]]
[If,(2 & [IModGet,subtoolPath]) != 2,
[VarSet,wid,[IWidth,subtoolPath]]
[IClick,subtoolPath,wid-75,5]
]
]
[IButton,“Set Intersection”,
[VarSet,subtoolPath,[StrMerge,“Tool:Subtool:”,[IGetTitle,“Tool:Current Tool”]]]
[If,(4 & [IModGet,subtoolPath]) != 4,
[VarSet,wid,[IWidth,subtoolPath]]
[IClick,subtoolPath,wid-50,5]
]
]
[IButton,“Set Colorize”,
[VarSet,subtoolPath,[StrMerge,“Tool:Subtool:”,[IGetTitle,“Tool:Current Tool”]]]
[If,(8 & [IModGet,subtoolPath]) != 8,
[VarSet,wid,[IWidth,subtoolPath]]
[IClick,subtoolPath,wid-25,5]
]
]
[IButton,“Set Visibility”,
[VarSet,subtoolPath,[StrMerge,“Tool:Subtool:”,[IGetTitle,“Tool:Current Tool”]]]
[If,(16 & [IModGet,subtoolPath]) != 16,
[VarSet,wid,[IWidth,subtoolPath]]
[IClick,subtoolPath,wid-10,20]
]
]