Open an app on my second display

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Mathlr
Posts: 1
Joined: 27 Jan 2022, 04:18

Open an app on my second display

Post by Mathlr » 27 Jan 2022, 04:34

Hello,

For a personal project I need to open 4 videos on y 4 screens. I want to do
it with ahk, but I can't find any code that permit to open an app on the
screen that I want.

Could you please help me to find a solution to my problem.

Per advance thank you.

Best regards.

Rohwedder
Posts: 7616
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Open an app on my second display

Post by Rohwedder » 27 Jan 2022, 06:02

Hallo,
opens a Notepad on each monitor:

Code: Select all

q::
SysGet, Mo, 80 ;Number of monitors
Loop,% Mo
{ ;capture the MonitorWorkAreas of your monitors
    n := A_Index
    SysGet, Mo%n%, MonitorWorkArea, %n%
	Run, notepad,,, PID
	WinWaitActive, ahk_pid %PID%
	WinMove, ahk_pid %PID%,, Mo%n%Left, Mo%n%Up, 500, 500
    WinMaximize
}

Post Reply

Return to “Ask for Help (v1)”