Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dedector Bot
#1
Question 
Hello Python lovers,
There is a thing I want but couldn't one.
I want to build a bot which is acts in order to images. For example, I want to say it click if image1 comes(it must be wait image one and click it then can pass to another command), However, we don't know when image1 will come. How can I do this?
Reply
#2
(Apr-19-2021, 05:09 PM)greathill Wrote: Hello Python lovers,
There is a thing I want but couldn't one.
I want to build a bot which is acts in order to images. For example, I want to say it click if image1 comes(it must be wait image one and click it then can pass to another command), However, we don't know when image1 will come. How can I do this?
There's nothing you can do about the time it arrives. You just have to wait for it. Presumably you have some ML system that is doing the recognition. All that happens is when the image arrives and is recognized, you react to it. Key here is that everything is asynchronous and event-driven. There is nothing that is "serial" programming.
Reply
#3
(Apr-20-2021, 04:53 AM)supuflounder Wrote:
(Apr-19-2021, 05:09 PM)greathill Wrote: Hello Python lovers,
There is a thing I want but couldn't one.
I want to build a bot which is acts in order to images. For example, I want to say it click if image1 comes(it must be wait image one and click it then can pass to another command), However, we don't know when image1 will come. How can I do this?
There's nothing you can do about the time it arrives. You just have to wait for it. Presumably you have some ML system that is doing the recognition. All that happens is when the image arrives and is recognized, you react to it. Key here is that everything is asynchronous and event-driven. There is nothing that is "serial" programming.
Thanks for the answer, I did with multiple while loops. E.g.
while True:
           image=imagesearch('./image')
           if image != [-1,-1]
              click()
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020