Hello everybody,
I wrote a script that lists videos, and allows to select one.
It then displays its name, and opens it with its full path, like this :
Write-Host($l[$nl-1].Name);
&$l[$nl-1].FullName;
It used to run pretty good.
Recently, after I took care of what happens when the list is less than a screen long, OK the video is still opened, but … behind the script window.
I hear the sound, and have to hurry up to click on the window in the tasks bar.
It was so handy to have it above the script window.
I tried a few options for MPC-HC, to show videos “always on top” : by default, always, during playing …
It did not seem to help.
Does anybody have a clue about what happened?
__
In what I made recently …
As the video is selected with a number, and numbers are typed in capslock, I took care of having the keyboard in capslock when waiting for input, thanks to what somebody proposed on StackOverflow :
Oh well, sorry I was too quick.
It seems WScript.Shell modified the reaction of the script, and this was the cause of the video played in the background.
But when reading my post again I found a workaround; just after launching the video:
But the strangest, is that when commenting out this workaround, and letting the call to WScript.Shell to activate CapsLock, well … now everything works fine.
Hum, I am afraid we shall never know what happened really, but I think I should not have found without asking the question.
So, thank you … for your time, if not anything else.
By the way, version 2.0.0.101 of MPC-HC is dated Jul 6th 2023.
The updater opens automatically to propose an update.