MPC script for resuming playback
2 posters
Page 1 of 1
MPC script for resuming playback
Hi, I want to make a script that loads mpc and the most recent file and resumes the playback. There was an old script on the videohelp forum but it doesn't work anymore. So I need a new one. And... I use powershell for this. And I don't really get what do I do wrong with the pathname parameter.
I get the most recent filename from the registry. And the problem is when I run for example
Start "c:\Program Files (x86)\K-Lite Codec Pack\MPC-HC64\mpc-hc64.exe" "E:\My Downloads\[04-2022] react-redux\05 State in React Components\056 Updating State Properties.mp4"
the player opens and says that file not found.
Why? What's wrong? Why it doesn't like the pathname?
Thank you
I get the most recent filename from the registry. And the problem is when I run for example
Start "c:\Program Files (x86)\K-Lite Codec Pack\MPC-HC64\mpc-hc64.exe" "E:\My Downloads\[04-2022] react-redux\05 State in React Components\056 Updating State Properties.mp4"
the player opens and says that file not found.
Why? What's wrong? Why it doesn't like the pathname?
Thank you
1111Eugene- Posts : 4
Join date : 2022-06-01
Re: MPC script for resuming playback
ok I've managed to do this. Need to finish it and will post it here if somebody needs it
1111Eugene- Posts : 4
Join date : 2022-06-01
Re: MPC script for resuming playback
here's the script
save as a yourfilename.ps1
make a shortcut on your desktop and insert in the input
yourPathToPowershell.exe -File "pathtoyourfilename.ps1"
mine for example looks like this
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -File "d:\My Downloads\Soft\continue.ps1"
the only problem is that it shows a powershell terminal window and there's no way to fix it (without 3rd party scripts or apps, so please google one for yourself if needed)
- Code:
$folders = Get-ChildItem -Path HKCU:\Software\MPC-HC\MPC-HC\MediaHistory\
$filename = $folders[0].GetValue("Filename")
cmd.exe /c Start "c:\Program Files (x86)\K-Lite Codec Pack\MPC-HC64\mpc-hc64.exe" $filename
save as a yourfilename.ps1
make a shortcut on your desktop and insert in the input
yourPathToPowershell.exe -File "pathtoyourfilename.ps1"
mine for example looks like this
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -File "d:\My Downloads\Soft\continue.ps1"
the only problem is that it shows a powershell terminal window and there's no way to fix it (without 3rd party scripts or apps, so please google one for yourself if needed)
1111Eugene- Posts : 4
Join date : 2022-06-01
Re: MPC script for resuming playback
The player already has options to remember file history and playback position. All you need to do is start the player and press play.
Plus the script is wrong, as first subkey isn't necessarily the last opened item.
Plus the script is wrong, as first subkey isn't necessarily the last opened item.
Re: MPC script for resuming playback
Admin wrote:The player already has options to remember file history and playback position. All you need to do is start the player and press play.
Plus the script is wrong, as first subkey isn't necessarily the last opened item.
oh yeah? what if I don't wanna press play?
How is it wrong? make the player run and play right away with your correct script then and show it to us.
1111Eugene- Posts : 4
Join date : 2022-06-01
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum