diff --git a/main.ahk b/main.ahk index 7aa4292..541efdf 100644 --- a/main.ahk +++ b/main.ahk @@ -1,4 +1,4 @@ -DownloadYoutubeVideo(dataType) +DownloadYoutubeVideo(dataType) { ; Note: This callback is usually fired twice when copying for some reason ; so we use "RunWait" below to make sure we only launch youtube-dl once. @@ -75,6 +75,9 @@ monitorConfigurations := Map( ) ) IdentifyMonitorConfiguration() { + ; TODO: Improve monitor matching by using the monitor guid. + ; See https://www.autohotkey.com/boards/viewtopic.php?t=116104 + count := MonitorGetCount() if (count == 1) { return "standalone" @@ -106,6 +109,7 @@ ArrangeWindows(wParam, lParam, msg, hwnd) monitorConfig := monitorConfigurations[monitorConfigName] ArrangeWindowsInMonitor(monitorConfig) } + ; Listen for the monitor change event OnMessage(0x007E, ArrangeWindows) @@ -134,4 +138,4 @@ OnMessage(0x007E, ArrangeWindows) monitorConfig := monitorConfigurations[Saved.LayoutChoice] ArrangeWindowsInMonitor(monitorConfig) } -} \ No newline at end of file +}