This is what chatgpt suggested trying with v1.0:
Code: Select all
; Open VLC and play each playlist for 20 seconds
; Define the URLs of your playlists
Playlist1 := "http://yourplaylisturl1.com"
Playlist2 := "http://yourplaylisturl2.com"
; Add more playlists as needed
; Set the duration in milliseconds (20 seconds)
Duration := 20000
; Function to open VLC, load a playlist, and play it
OpenAndPlay(Playlist) {
Run, "C:\Program Files\VideoLAN\VLC\vlc.exe" %Playlist% ; Adjust the path to your VLC installation
WinWait, ahk_exe vlc.exe
WinActivate ; Activate VLC window
Sleep, 1000 ; Wait for VLC to load
Send, ^o ; Open playlist
Sleep, 1000 ; Wait for the "Open Media" window
SendInput, %Playlist%{Enter} ; Enter the playlist URL
Sleep, 1000 ; Wait for VLC to load the playlist
Send, p ; Play the current playlist
Sleep, %Duration% ; Wait for the specified duration
Send, s ; Stop playback
Sleep, 1000 ; Give VLC some time to process the stop command
WinClose ; Close VLC
}
; Press F1 to start playing the playlists
F1::
OpenAndPlay(Playlist1)
OpenAndPlay(Playlist2)
; Add more playlists as needed
return