hi am am make a yew cuter it clicks to many time what would be the best time

repeat
Wait(400+random(150));
Until not IsUpText('ew') or (InvFull);
end;

thanks for looking