Add or Subtract to Boolean object

Hi, I've tried scripting something like this with boolean.
Compund Obects > Boolean
Not Power Boolean

$.option[2] = 0
$.operand_tm[2] = prs ()
clearSelection()

But don't work with macro recorder.

The main goal is to make a hotkey where you can add objects to the list of Boolean another objects.

Thanks for advise! :
)