App.open("QuickTime Player") while not exists(): click(Location(200,200)) type("w",KeyModifier.CMD) wait(1) click(Pattern().targetOffset(221,0))