If the latch where the micro switch is is wonky that will cause you a problem.
Stick a pen into where the micro switch is and attempt to close the window.
If it closes it means the latch from the top isn’t making good contact.
Ensure the latch is not lose or broken.
|