Generally speaking, the UI responds to events; it doesn't trigger them. For example, the bank UI opens
in response to the "bank opened" event -- opening the bank UI isn't what triggers the event.
For the PVP queue frame, no events are involved either way, so you'd just need to hook the OnShow script handler for the frame:
Lua Code:
frame:HookScript("OnShow", function(self)
-- do stuff here
end)
However, depending on how the default UI code is operating in this area, OnShow may be too early; you should
look through the default UI code and find the Blizzard function that's actually resetting those filters, and hook that instead:
Lua Code:
hooksecurefunc("NameOfTheFunction", function(list, of, args, the, function, receives)
-- do stuff here
end)
The quickest way to find the right part of the UI code is probably to search for the name of the PVP queueing frame (use /fstack in-game to find it) and follow the links to the Lua file (the frame itself will be created in an XML file) where all its functions are defined.