How can I check if a screen variant is active without knowing its name?

Use the notation

if not Q[screenvariant=]



Please observe that, for GuiXT, the existence of a screen variant means:
screen variant + GuiXT script stored in the variant. Variants without GuiXT script are not detected by GuiXT.