Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getDesktopNumOfWindow sometimes returns -1 rather than the correct num #46

Open
zhcqiu opened this issue Jun 21, 2023 · 4 comments
Open

Comments

@zhcqiu
Copy link

zhcqiu commented Jun 21, 2023

If I minimize a window in other virtual desktops, the VD.getDesktopNumOfWindow sometimes returns -1 rather than the correct num.
Some apps don't have such a problem, such as notepad.exe, while others, like telegram.exe, code.exe, and tim.exe, have such a problem.
According to my analysis, the problem may be due to the method: _tryGetValidWindow.
I use Windows 11 Pro, the English version, and AutoHotkey 2.02. I wonder if others encounter such a problem.

@FuPeiJiang
Copy link
Owner

I was able to reproduce using telegram.exe portable, a winTitle of "Telegram" has many possible hwnd, I need to loop through them

@zhcqiu
Copy link
Author

zhcqiu commented Jun 22, 2023

I guess a loop through the virtual desktops to read ahk_id may be a good idea.

@FuPeiJiang
Copy link
Owner

@zhcqiu

FuPeiJiang added a commit that referenced this issue 13 hours ago

update and try, does it work now ?

@zhcqiu
Copy link
Author

zhcqiu commented Jun 23, 2023

I updated the script, and it works. Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants