Improve Multi-Screen Support
Closed this issue · 4 comments
I've pip installed, im using my primary monitor on the right resolutions but it simply doesn't work. It'll say tft lobby detected and attempt to queue but it just drags my mouse all the way off the screen and does nothin from there
Hi there,
Can you please attach the log it generated, as that may have some indications what is going wrong?
Hi, it seems to be going wrong here:
2023-03-28 00:17:37.253 | INFO | main:queue:265 - TFT lobby detected, finding match
2023-03-28 00:17:41.665 | DEBUG | click_helpers:click_to_middle:158 - M|Could not find 'C:\Users\user\AppData\Roaming\TFT Bot_MEI160322\captures/buttons/find_match_highlighted.png', skipping
2023-03-28 00:17:42.181 | DEBUG | main:find_match:185 - Clicking find match success: False
2023-03-28 00:17:44.032 | INFO | main:wait_for_league_running:211 - Pausing bot to watch for league game startup (30 second timeout)
Odd, so according to that log it's failing to find the find_match_highlighted
image, and then also failing to locate the 'queue' images on screen either 🤔
Which monitor is your 'primary' (left/right/middle)?
Are you able to attempt testing this with only your primary monitor connected? I wonder if it's somehow using the wrong screen or not searching multiple screens.
So, I've narrowed the issue down, at least for gold. The imagesearch library combines all monitors into one big image to check. Regardless of your set-up or primary monitor, the left-most monitor is where it starts, and the right-most monitor is where it stops. The issue this results in is if we call screen_helpers.onscreen_region_num_loop
, we specify fixed pixels, so people with a monitor left of their primary monitor will run into the above issues.
I don't know why it's also failing to determine the minimum round, but we have something to work off of for now.
(For this to be regarded as fixed or implemented, we'll also need to update the pixels we click to.)
Also, as information for the original poster, It does not matter which screen the client is on anymore, as we now interact without checking or clicking anything visual.