mrob95/pyvda

Is there any chance that pyvda be updated for windows 11?

phpjunkie420 opened this issue · 3 comments

Is there any chance this can be updated for windows 11?

My installation of windows 11 is modified. I'm also using python 3.11.7, cause pyvda doesn't work with python 3.12.

I've been able to get pyvda to work on windows 11.

Anyway, can you update pyvda to work with windows 11?

So it seems like you are having two issues:

  • It isn't working with python 3.12
  • It isn't working with windows 11

Could you give some more details (error messages etc) about what happens in each case? I am running it on Windows 11 with no issues, but maybe there is a new insider version or something that breaks it.

Also please make sure you are running the latest version - 0.3.2 - as there have been fixes for both of these things in the past.

I'll check it out on a virtual machine and see what happens.

Tested with python 3.12.1 and PyCharm 2023.3.2 on Windows 11 Professional and everything worked just fine. Last time I tried this about a month ago is when I had this problem. It didn't work with 3.12 on Windows 11. I'm glad pyvda was updated.

from pyvda import get_apps_by_z_order, get_virtual_desktops, VirtualDesktop as Desktop
from win32gui import GetWindowText
from time import sleep

desktop_names = [
    'Desktop 1',
    'Desktop 2',
    'PyCharm',
    'Games',
    'DVDFab & StreamFab',
    'Alienware Command Center',
]


for i in range(6):
    desktop = next((desktop for desktop in get_virtual_desktops() if desktop.number == i + 1), None)
    if desktop is not None:
        desktop.rename(desktop_names[i])
    else:
        Desktop.create().rename(desktop_names[i])


pycharm = next((window for window in get_apps_by_z_order(current_desktop = False) if GetWindowText(window.hwnd) == r'Scripts – …\testing\create_virtual_desktops.py'), None)
desktop = next((desktop for desktop in get_virtual_desktops() if desktop.name == 'Desktop 2'), None)
pycharm.move(desktop)
sleep(1)
desktop.go()