# Stop "Wait for text to appear on screen" if a condition is satisfied

**URL:** <https://community.folivora.ai/t/stop-wait-for-text-to-appear-on-screen-if-a-condition-is-satisfied/38983>\
**Category:** Configuration Help & General Discussion\
**Created:** [August 31, 2024, 10:10am UTC](https://community.folivora.ai/t/stop-wait-for-text-to-appear-on-screen-if-a-condition-is-satisfied/38983 "2024-08-31T10:10:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ishaan\_Rathod](https://community.folivora.ai/user_avatar/community.folivora.ai/ishaan_rathod/32/33408_2.png) [@Ishaan\_Rathod](https://community.folivora.ai/u/Ishaan_Rathod)\
**Post date:** [August 31, 2024, 10:10am UTC](https://community.folivora.ai/t/stop-wait-for-text-to-appear-on-screen-if-a-condition-is-satisfied/38983/1 "2024-08-31T10:10:24Z")

</div>

So i am developing a trigger to search apple music library and switch to searching apple music if the song is not found in my library. I have almost achieved this. The only problem I'm facing currently is stopping the "wait for text to appear on screen" if i left click. Im not able to find a way to do this. Basically what i want to do is keep finding for text "Search Apple Music" (which appears when song searched is not in library) until i do a mouse click (which is clicking the song which i would only if it present in my library. I hope I'm clear lol. Thanks for any suggestions.

 ![image](https://community.folivora.ai/uploads/default/original/3X/6/a/6af64ee44f5803ce7e5bfd9d6b00f5ffcb2d1926.jpeg)

I dont know how to write an apple script so if you guys know a way to achieve this through apple script that would be great too!
