Controlling windows, apps and dialogue boxes