FuPeiJiang / VD.ahk

Windows Virtual Desktop, AutoHotkey, Windows 11 support, Windows Server 2022, switch desktop, move window(wintitle) to current desktop; createDesktop, PinWindow, getCount, getDesktopNumOfWindow -> mute all windows in Virtual Desktop
MIT License
319 stars 45 forks source link

Move All Windows of ahk_exe #24

Open HenryTheVacuum opened 1 year ago

HenryTheVacuum commented 1 year ago

F10::VD.MoveWindowToDesktopNum("ahk_exe Firefox.exe",3)

How to make this move all windows? right now only 1 of the windows moves to the specified desktop.

megamorphg commented 1 year ago

You'll want to loop and do this on every window based on the ID:

WinGet, list, list, ahk_exe Firefox.exe
Loop, % list
    VD.MoveWindowToDesktopNum("ahk_id " list%A_Index%,3)
HenryTheVacuum commented 1 year ago

Thank you.

However, it needs the following in order to work: DetectHiddenWindows, On

HenryTheVacuum commented 1 year ago

DetectHiddenWindows, On

Using the above in the code breaks the following commands VD.goToDesktopNum(1)

Looking for a fix

FuPeiJiang commented 1 year ago

@jesse9212 thanks for the bug report , should be fixed now