play-and-exit issue

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
bw_wyo
New Cone
New Cone
Posts: 1
Joined: 13 Dec 2022 22:11

play-and-exit issue

Postby bw_wyo » 13 Dec 2022 22:23

I am writing a PowerShell script that uses the VLC command-line interface to load a playlist and play it. I want it to play the playlist and then exit. Everything works, except it doesn't exit at the end. My code looks like this:

Code: Select all

$musicPLayer = "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" Start-Process -FilePath $musicPlayer -ArgumentList """$path1"" --playlist-enqueue --one-instance" Start-Process -FilePath $musicPlayer -ArgumentList """$path2"" --playlist-enqueue --one-instance" Start-Process -FilePath $musicPlayer -ArgumentList """$path3"" --playlist-enqueue --one-instance" Start-Process -FilePath $musicPlayer -ArgumentList " --play-and-exit --one-instance"
Any suggestions? Is there a better way to do it?

Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 12 guests