ANRAR4 / AutoBTD6

The scripts contained in this repository allow you to automatically play any gamemode on any map in Bloons TD6
31 stars 4 forks source link

screen BTD6_UNFOCUSED! when is on focus #11

Closed VozDeOuro closed 1 year ago

VozDeOuro commented 1 year ago

the terminal is on my second screen, and the game on full screen on my main what can i do to fix that ?

ANRAR4 commented 1 year ago

Which version of BTD6 are you playing(i. e. steam or epic) or rather how is the BTD6 window called?

VozDeOuro commented 1 year ago

I'm playing steam version and the process name is BloonsTD6.exe and the game tab is BloonsTD6

ANRAR4 commented 1 year ago

Do you have AutoHotkey installed?

Additionally the python ahk library requires AutoHotkey (www.autohotkey.com) to be installed.

VozDeOuro commented 1 year ago

Yes i do here is the on Win path image

i did that manually because for some reason the AHK didn't

ANRAR4 commented 1 year ago

If BTD6 really is the focussed window it should work then.

You could test something like

from ahk import AHK
import time

ahk = AHK()
time.sleep(3)
print(ahk.get_active_window().title.decode())

to see if the window title gets detected correctly. (for BTD6 it should output BloonsTD6)

VozDeOuro commented 1 year ago

If BTD6 really is the focussed window it should work then.

You cound test something like

from ahk import AHK
import time

ahk = AHK()
time.sleep(3)
print(ahk.get_active_window().title.decode())

to see if the window title gets detected correctly. (for BTD6 it should output BloonsTD6)

i ran it on a different script, i don't know if was that what you mean, and it didn't work image

ANRAR4 commented 1 year ago

Which version of Python, AutoHotkey and the python ahk package are you using?

VozDeOuro commented 1 year ago

Python 3.7.9 AHK 2.0 pip AHK 0.14.2

ANRAR4 commented 1 year ago

As far as i can tell AHK 2.0 is not yet supported by the python ahk package(https://github.com/spyoungtech/ahk/issues/183). So you would need to install AHK 1.x.

VozDeOuro commented 1 year ago

it works but its failing on the middle of the game

ANRAR4 commented 1 year ago

Failing in the sense of losing all lives? That may be due to balance changes that happend in some newer version. I did't test all playthroughs for the current version. But you can record or adapt playthroughs yourself to make them work in the current version.

VozDeOuro commented 1 year ago

ok, thx for the fast help