You'll have to create a loop to check your conditions, once found do something to know you found it.