MasonStooksbury / Free-Games-V2

New and improved games grabber for Epic Games that utilizes the Desktop Application rather than the webapp
MIT License
22 stars 4 forks source link

Edge case scenario when epic is already open? #4

Closed DamianPaniagua closed 10 months ago

DamianPaniagua commented 10 months ago

(Sorry if I should not be making an issue over this)

I know it will close epic in the future so this should not be an isssue. Just figured I would mention this. While testing this my epic was already scrolled past or already on the free games section. Then when I ran the tool it would click store and scroll which would then skip over the free game section.

Potential solution, could be having it check for the free now text before it does anything at all?

Another solution, could be making the script scroll back up after scrolling down for a while?

Again, Sorry if this is not an "issue" or not worth your time. Thank you for making this tool.

MasonStooksbury commented 10 months ago

Nah, definitely keep making Issues, it's how I know what I can work on to make this better.

And yep! Good catch. My default assumption is that it either isn't open, or if it is, it will scroll down and start looking. I'll add in some code to hopefully fix both of these cases.

Thanks for filing this issue!

MasonStooksbury commented 10 months ago

Alright, so I rearranged how the grabFreeGame function works. Basically, it will make sure the window is focused (by clicking on the store link like before), but then it will scroll all the way to the top, and start its search from there. A little hacky, but should be a bit more robust now