Move multiple windows with the same name

Get help with using AutoHotkey and its commands and hotkeys
Hobbes
Posts: 1
Joined: 24 Jul 2019, 05:39

Move multiple windows with the same name

18 Nov 2020, 04:14

I'm setting up a script to arrange a bunch of windows in specific locations.
The script mostly works, there's one issue I can't figure out: I usually have two or more Firefox windows open. I want to move all of them to the same location (having them overlap is not a problem)

I can move one window using this command:
WinMove, ahk_exe firefox.exe , ,960 ,180, 1600,1050

but how can I move all Firefox windows? They all have the same ahk_exe and ahk_class, the window title and pid are unpredictable.
User avatar
boiler
Posts: 6631
Joined: 21 Dec 2014, 02:44

Re: Move multiple windows with the same name

18 Nov 2020, 06:47

Use the List sub-command of WinGet to get a list of all windows that meet the criteria. You can then create a loop and move each one. Example #2 on that page shows how to set up such a loop.

Return to “Ask For Help”

Who is online

Users browsing this forum: Google [Bot], HiSoKa, songdg, TAC109 and 27 guests