I want a script that automatically sets a position/size for each new window I open on Firefox, since I hate how when you open a new windows it's position is relative to the last window of the program instead of opening it in the exact same place the last windows was.
^n::SendInput !a !a::WinMove, ahk_class MozillaWindowClass,, 10,-10,1350,750
I set Ctrl+N (new windows shortcut) to send the keystroke that sets the position/size so it does it immediatly after a new windows is opened. The problem is once I set it on AHK, Ctrl+N no longer works on Firefox.
I posted this on AHK forums and a guy made this code
#IfWinActive, ahk_class MozillaWindowClass ~^n:: WinGetActiveTitle, CurrentMozillaWin WinWaitNotActive, %CurrentMozillaWin% WinWaitActive, %CurrentMozillaWin% WinMove,,, 10,-10,1350,750 Return #IfWinActive !a::WinMove, ahk_class MozillaWindowClass,, 10,-10,1350,750
But it doesn't work for me... also if someone could tell me how to make this work with other programs such as explorer.exe that would be awesome too...