; ; AutoHotkey Version: 1.x ; ; Script Function: ; VLC mit Videodatei starten und Fenster auf Monitore verteilen ; #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetTitleMatchMode 2 ;A window's title can contain WinTitle anywhere inside it to be a match. if 0 < 1 ; %0% enthaelt die Anzahl der Parameter { MsgBox Dieses Script muss mit einer Videodatei als Parameter aufgerufen werden ExitApp } ; Pfad auslesen Loop %1%,1 LongPath = %A_LoopFileLongPath% ; VLC starten Run, %A_ProgramFiles%\Video Lan Client\vlc.exe --no-overlay --vout="directx" --vout-filter="wall" --wall-cols="2" --wall-rows="1" --wall-element-aspect="5:4" "%LongPath%", %A_ProgramFiles%\Video Lan Client ; Warten bis beide Fenster sichtbar sind WinWait , VLC media player WinWait , VLC (hardware YUV DirectX output) ; Beide VLC-Fenster auf die Monitore verteilen und auf Vollbild schalten ;Linkes Fenster holen WinGet, sw_winl, ID, VLC media player sw_winl = ahk_id %sw_winl% ;Rechtes Fenster holen WinGet, sw_winr, ID, VLC (hardware YUV DirectX output) sw_winr = ahk_id %sw_winr% ;Monitor ausmessen SysGet, sw_mon_area, 78 sw_mon_quarter := sw_mon_area / 4 ;MsgBox, %sw_mon_quarter% ; Linkes Fenster auf den 1. Monitor, 100 Pixel von oben und links WinMove, %sw_winl%,, 100, 100 ; Rechtes Fenster auf den 2. Monitor, 100 Pixel von oben und 0 links WinMove, %sw_winr%,, sw_mon_area / 2, 100 ;in den Vordergrund, damit der Doppelklick trifft WinSet, Top, ,sw_winr ;Vollbild durch Doppelklick DllCall("SetCursorPos", int, sw_mon_area / 2 + 100, int, 200) ; Maus positionieren Click 2 ; und Doppelklick ;das gleiche mit linkem Fenster WinSet, Top, ,sw_winl DllCall("SetCursorPos", int, 200, int, 200) Click 2 ; Variablen wieder frei machen sw_winl = sw_winr = sw_mon_quarter = sw_mon_area = ExitApp