A quick little powershell script to pop up a video and play it in Windows. Personally, I'm a little disappointed in this here, as I still haven't sorted out a good method to know when to close the external program, position it, or size it, but I'm certain those options are probably all in Powershell somewhere -- even if I don't know where, yet! ;P
Anyone with more experience with powershell and this sort of thing, is more than welcome to help expand on this little demo and hopefully highlight the things I'm missing out on. ;D
Title: Re: Pop-Up Video
Post by: Pete on January 12, 2021, 12:42:07 pm
Isn't just easier to SHELL to an installed media player, or your default media player?
But are you certain someone else’s PC will have VLC installed? All my windows machines run powershell, but not all of them use the same video playback programs.
Title: Re: Pop-Up Video
Post by: Pete on January 12, 2021, 03:06:08 pm
Ah, but I also stated you can just use whatever default media player is installed...
Note that QB64 still supports START. START was meant to use the operating system to find the program, regardless of the directory, and to use a default device, if none was specified. That's the way I remember it, anyway.
Pete
Title: Re: Pop-Up Video
Post by: SpriggsySpriggs on January 12, 2021, 03:34:14 pm
The main thing I'm lacking here is now someway to calculate the movie time and then auto-close the task, and I'll have a pop-up video player to use with a few programs in windows. :)
Title: Re: Pop-Up Video
Post by: Pete on January 12, 2021, 11:24:29 pm
Again, why not just download a media player, that can be configured to close upon completion like VLC?
Pete
Title: Re: Pop-Up Video
Post by: SMcNeill on January 12, 2021, 11:35:27 pm
Again, why not just download a media player, that can be configured to close upon completion like VLC?
Pete
Because I'm shooting for something native which I can share with others, without expecting them to download other programs which they might not be interested in.
Because I'm old, and like to reinvent the wheel. You should appreciate this, as you like to recreate text editors and word processes, rather than downloading OpenOffice, Word, or any of the other numerous ones out there.
Just because. :P
Title: Re: Pop-Up Video
Post by: Pete on January 12, 2021, 11:37:34 pm
What is this Open Office and Word you speak of?
Pete :D
Title: Re: Pop-Up Video
Post by: SpriggsySpriggs on January 13, 2021, 12:02:50 am
If the video is mp4 then you can extract the audio with Audacity and then you can determine the length with SNDLEN.
Title: Re: Pop-Up Video
Post by: Pete on January 13, 2021, 12:33:18 am
I can't believe you had the audacity to recommend that!