Waits for the auxiliary object to appear. If the object appears the function is applied, otherwise nothing happens.