Page 1 of 1

Opening Multiple file windows to specific location

Posted: 21 May 2019, 16:08
by ItsJrod
I wanted to know if there is a way to open two text files, one to the left hand side of my screen and one to my right, at the same time.

Thanks!

EDIT: I guess my question should be refined to: I am having trouble using WinMove for multiple windows. Here is what I have:

Code: Select all

Run, Notepad TextFile1.txt
WinWait, Notepad
WinMove, 0,0

Run, Notepad TextFile2.txt
WinWait, Notepad
WinMove, 400,400
This is resulting in only TextFile1.txt being opened, and it is just opening at the last remembered location.

Re: Opening Multiple file windows to specific location

Posted: 22 May 2019, 04:19
by elModo7
You can open one, wait for notepad to be opened and then with win key + left arrow you can have it move to the left.
Then open another one, wait for notepad, repeat same combo with right arrow.

Re: Opening Multiple file windows to specific location

Posted: 22 May 2019, 08:42
by ItsJrod
elModo7 wrote:
22 May 2019, 04:19
You can open one, wait for notepad to be opened and then with win key + left arrow you can have it move to the left.
Then open another one, wait for notepad, repeat same combo with right arrow.
This would work for snapping them, but I want to specify an exact position and window size so that I can still see the center of the screen.

Re: Opening Multiple file windows to specific location

Posted: 22 May 2019, 10:35
by Sam_
ItsJrod wrote:
22 May 2019, 08:42
elModo7 wrote:
22 May 2019, 04:19
You can open one, wait for notepad to be opened and then with win key + left arrow you can have it move to the left.
Then open another one, wait for notepad, repeat same combo with right arrow.
This would work for snapping them, but I want to specify an exact position and window size so that I can still see the center of the screen.

Code: Select all

Run, Notepad.exe, , , PID1
WinWait, ahk_pid %PID1%
WinMove, ahk_pid %PID1%, , 0, 0

Run, Notepad.exe, , , PID2
WinWait, ahk_pid %PID2%
WinMove, ahk_pid %PID2%, , 400, 400

Re: Opening Multiple file windows to specific location

Posted: 22 May 2019, 13:52
by ItsJrod
Sam_ wrote:
22 May 2019, 10:35
ItsJrod wrote:
22 May 2019, 08:42
elModo7 wrote:
22 May 2019, 04:19
You can open one, wait for notepad to be opened and then with win key + left arrow you can have it move to the left.
Then open another one, wait for notepad, repeat same combo with right arrow.
This would work for snapping them, but I want to specify an exact position and window size so that I can still see the center of the screen.

Code: Select all

Run, Notepad.exe, , , PID1
WinWait, ahk_pid %PID1%
WinMove, ahk_pid %PID1%, , 0, 0

Run, Notepad.exe, , , PID2
WinWait, ahk_pid %PID2%
WinMove, ahk_pid %PID2%, , 400, 400
This is solid, thank you!