In addition to what you had with slight adjustment:
monitor_event DiplomacyPanelOpen TrueCondition
set_counter declineDiplomaticOffer 1
end_monitor

monitor_conditions I_CompareCounter declineDiplomaticOffer = 1
set_counter declineDiplomaticOffer 0
select_ui_element diplomacy_decline_offer_button
simulate_mouse_click lclick_down
simulate_mouse_click lclick_up
end_monitor
declines the diplomacy offer, I just can't figure out how to quit the scroll
I think the one you're trying to use
select_ui_element confirm_quit_scroll
is actually the "do you really want to leave the game, yes or no" scroll
but can't figure out what button for just escaping scroll actually is