ra1nty / DXcam

A Python high-performance screen capture library for Windows using Desktop Duplication API
MIT License
457 stars 67 forks source link

Allow Idling #52

Open Raymond88824 opened 1 year ago

Raymond88824 commented 1 year ago

In the README section listed below its speaks about idling. Is there a way to allow idling so that screenshot still take place even without change?

It is worth noting that .grab will return None if there is no new frame since the last time you called .grab. Usually it means there's nothing new to render since last time (E.g. You are idling).

I have been able to get around the problem of screenshots not being taken with the below code. But was wondering if there was a built in method not mention in the README?

while "Forever" == "Forever":
    try:
        if screenshot.size != "Anything":
            break
    except:
        screenshot = camera.grab(region=[0, 0, 1920, 1080])
        print("Screenshot Error - Rataking")
wookidooki8 commented 1 year ago

yes please whats up with this idling feature?