Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Screen Capture does not update #34

Open
davidqian88 opened this issue Aug 24, 2023 · 5 comments
Open

Screen Capture does not update #34

davidqian88 opened this issue Aug 24, 2023 · 5 comments

Comments

@davidqian88
Copy link

Hi,
The screen capture doesn't update when running. Restarting the script doesn't help. It update's when the program is closed or switching the capture to a different program. I tried reinstalling the environment and updating to python 3.11.5.
image
If I started the script before HoloCure, then it will capture something in the background.
image
I don't think the capture_game would leave any cache. But it seems like that way.

@nopeAnon
Copy link
Owner

It update's when the program is closed or switching the capture to a different program.

That wouldn't make sense. It shouldn't do anything when it's closed.

if hwndMain == 0:
time.sleep(1)
continue

And it shouldn't even switch programs, since there should only be one application with the window class YYGameMakerYY and title HoloCure

hwndMain = win32gui.FindWindow("YYGameMakerYY", "HoloCure")

image

Can you try running the script again with all windows closed except holocure?

@davidqian88
Copy link
Author

This is what I got after closing the browser and launch the game before running the script. I was switching the capture window in the script manually to check if it is looking for the correct window.
image

@davidqian88
Copy link
Author

davidqian88 commented Aug 25, 2023

It update's when the program is closed or switching the capture to a different program.

The screenshot "resets" when I run the script without opening the HoloCure. The screenshot will stay the same when I stop the script and HolocCure and run the script after HoloCure is launched or if I stop the script and re-run while HoloCure is running.

@Hexus-One
Copy link
Contributor

Hi it looks like you're on Windows 11 - I wrote and tested the code on Windows 10 only (using VS Code) so I'm not sure how it would behave on Win11. Does the program still work regardless of the debug window display?

@davidqian88
Copy link
Author

Does the program still work regardless of the debug window display?

Unfortunately it’s not. I’ll try the timer you mentioned in issue 21.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants