Need to click on F5 untill the value occurs

Hello Community,

I am working on terminal activities. here after i key in the input value in the command line i need to get the ac number if its not visible need to click on f5 until it appears. can you please help me with the flow how to retry the value while or do while using.

User request : Paste “f ” (from excel input file) at COMMAND - press Enter. If ac not found at the first page, search (press F5) until 1mil Lines Search.

can any one help me with the flow.