As a toggle, no - macros cannot change the state of character sheet without scripts. But you can include a query for the bonus in the attack macro, such as ?{bonus?|No,+0|Yes,+4} within the inline roll of the attack - or easier yet, add that as a global damage modifier, so whenever that modifier is checked, the query pops up when you roll to attack. You can also link the global_attack_mod_flag attribute to a token bar - changing the value of that attribute between 1 and 0 enables or disables all checked on attack modifiers. Unfortunately you can't link the flags of individual modifiers, believe me, I've tried, it breaks the sheet.