until *Pending() > 0 & Event() == "q" do { # loop until there is something to do px := WAttrib("pointerx") py := WAttrib("pointery") # do whatever is needed WDelay(5) # wait and share processor }