Try:
window = CreateWindow("WFT", 300, 300, 300, 300) timer = CreateTimer(60) Repeat e = PeekEvent() WaitTimer timer Until KeyDown(1) Or e = $4001