tryptech / obs-zoom-and-follow

Dynamic zoom and mouse tracking script for OBS Studio
Apache License 2.0
375 stars 62 forks source link

issue with Japanese window titles? #143

Open tactlessten opened 12 months ago

tactlessten commented 12 months ago

I wanted to use this script to aide my Japanese study while playing games in Japanese. It worked perfectly with Genshin Impact while the game was in English, with an EN window title.

But when I changed the game's language to Japanese, the window title changed to 原神 which I think caused the following error:

[zoom_and_follow_mouse.py] Traceback (most recent call last): [zoom_and_follow_mouse.py] File "C:\Users\xxxx\Documents\xxxx\OBS PYTHON\zoom_and_follow_mouse.py", line 371, in toggle_zoom [zoom_and_follow_mouse.py] zoom.update_source_size() [zoom_and_follow_mouse.py] File "C:\Users\xxxx\Documents\xxxx\OBS PYTHON\zoom_and_follow_mouse.py", line 58, in update_source_size [zoom_and_follow_mouse.py] window = pwc.getWindowsWithTitle(data[0])[0] [zoom_and_follow_mouse.py] IndexError: list index out of range

Any ideas how to resolve this?

Danie10 commented 12 months ago

I know you can also right-click on window title bar sometimes and set a window name (when it is active with Japanese language). I can't see now where I set that in the GUI (pretty sure I did), but other way is with xdotool which is incredibly powerful e.g. at https://askubuntu.com/questions/626505/how-do-i-permanently-change-window-titles.

tactlessten commented 12 months ago

Unfortunately I'm windows OS and I'm a little worried about xdotool causing issues

But thank you for the reply!