application condition if window exists