Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

Media Player Classic Home Cinema Function Libraries.


  • Please log in to reply
16 replies to this topic
specter333
  • Members
  • 627 posts
  • Last active: Oct 07 2016 07:43 AM
  • Joined: 15 Jan 2007
Media Player Classic Home Cinema Send and HTTP Function Libraries

As requested here is the HTTP function library for MPC-HC a very nice media player that can be downloaded from Source Forge. Media Player Classic Home Cinema

I like using these functions because unlike hotkeys the player can be controlled when it is not the active window. The library is only a small sample of the commands available but any command can be easily added.

Updated 12/17/11
Thanks to XX0, I've now created a "Send" library for MPC. The Send command responds faster and requires no setup in Media Player Classic.
In addition to the basic commands I've add a function to use any of the 138 command numbers as a parameter.
The HTTP library now uses the host computer's IP and port as a parameter making it usable for controlling MPC over a network.

A demo script has been added to a later post. Media Player Classic Functions Libraries Demo Script

The Send library:
No setup is required in MPC.
MediaPlayerClassicHC.ahk
; Media Player Classic Home Cinema Function Library by Specter333
; http://www.autohotkey.com/forum/viewtopic.php?p=490310#490310
; A complete list of functions can be found at the bottom of the page.
; Use Send functions to control Media Player Classic Home Cinema 
; with out it being active.
; Home page, http://mpc-hc.sourceforge.net/
; If being used on a local machine this function responds faster than MPCHTTP


MediaPlayerClassicHC(msg) 
	{
	; For "msg" use a number from the list of commands at the bottom of the page.
	SendMessage,0x0111,msg,,,ahk_class MediaPlayerClassicW
	}
MediaPlayerClassicHC_Play()
	{
	SendMessage,0x0111,887,,,ahk_class MediaPlayerClassicW
	}
MediaPlayerClassicHC_Pause()
	{
	SendMessage,0x0111,888,,,ahk_class MediaPlayerClassicW
	}
MediaPlayerClassicHC_PlayPause()
	{
	SendMessage,0x0111,889,,,ahk_class MediaPlayerClassicW
	}
MediaPlayerClassicHC_Stop()
	{
	SendMessage,0x0111,890,,,ahk_class MediaPlayerClassicW
	}
MediaPlayerClassicHC_FullScreen()
	{
	SendMessage,0x0111,830,,,ahk_class MediaPlayerClassicW
	}
MediaPlayerClassicHC_JumpForward()
	{
	SendMessage,0x0111,902,,,ahk_class MediaPlayerClassicW
	}
MediaPlayerClassicHC_JumpBackward()
	{
	SendMessage,0x0111,901,,,ahk_class MediaPlayerClassicW
	}
MediaPlayerClassicHC_PlayFaster()
	{
	SendMessage,0x0111,895,,,ahk_class MediaPlayerClassicW
	}
MediaPlayerClassicHC_PlaySlower()
	{
	SendMessage,0x0111,894,,,ahk_class MediaPlayerClassicW
	}
MediaPlayerClassicHC_PlayNormal()
	{
	SendMessage,0x0111,896,,,ahk_class MediaPlayerClassicW
	}
MediaPlayerClassicHC_VolumeUp()
	{
	SendMessage,0x0111,907,,,ahk_class MediaPlayerClassicW
	}
MediaPlayerClassicHC_VolumeDown()
	{
	SendMessage,0x0111,908,,,ahk_class MediaPlayerClassicW
	}
MediaPlayerClassicHC_Mute()
	{
	SendMessage,0x0111,909,,,ahk_class MediaPlayerClassicW
	}
MediaPlayerClassicHC_RootMenu()
	{
	SendMessage,0x0111,923,,,ahk_class MediaPlayerClassicW
	}
MediaPlayerClassicHC_Exit()
	{
	SendMessage,0x0111,816,,,ahk_class MediaPlayerClassicW
	}

/*	
Use one of the numbers from the commands below with the MediaPlayerClassicHC(msg)
function to call commands not included in this library.  

Use only the number, example the Open File function = MediaPlayerClassicHC(800)

800 Open File
801 Open DVD
802 Open Device
805 Save As
806 Save Image
807 Save Image (auto)
809 Load Subtitle
810 Save Subtitle
804 Close
814 Properties
816 Exit
889 Play/Pause
887 Play
888 Pause
890 Stop
891 Framestep
892 Framestep back
893 Go To
895 Increase Rate
894 Decrease Rate
896 Reset Rate
905 Audio Delay +10ms
906 Audio Delay -10ms
900 Jump Forward (small)
899 Jump Backward (small)
902 Jump Forward (medium)
901 Jump Backward (medium)
904 Jump Forward (large)
903 Jump Backward (large)
898 Jump Forward (keyframe)
897 Jump Backward (keyframe)
921 Next
920 Previous
919 Next Playlist Item
918 Previous Playlist Item
817 Toggle Caption&Menu
818 Toggle Seeker
819 Toggle Controls
820 Toggle Information
821 Toggle Statistics
822 Toggle Status
823 Toggle Subresync Bar
824 Toggle Playlist Bar
825 Toggle Capture Bar
826 Toggle Shader Editor Bar
827 View Minimal
828 View Compact
829 View Normal
830 Fullscreen
831 Fullscreen (w/o res.change)
832 Zoom 50`%
833 Zoom 100`%
834 Zoom 200`%
967 Zoom Auto Fit
860 Next AR Preset
835 VidFrm Half
836 VidFrm Normal
837 VidFrm Double
838 VidFrm Stretch
839 VidFrm Inside
840 VidFrm Outside
884 Always On Top
861 PnS Reset
862 PnS Inc Size
864 PnS Inc Width
866 PnS Inc Height
863 PnS Dec Size
865 PnS Dec Width
867 PnS Dec Height
876 PnS Center
868 PnS Left
869 PnS Right
870 PnS Up
871 PnS Down
872 PnS Up/Left
873 PnS Up/Right
874 PnS Down/Left
875 PnS Down/Right
877 PnS Rotate X+
878 PnS Rotate X-
879 PnS Rotate Y+
880 PnS Rotate Y-
881 PnS Rotate Z+
882 PnS Rotate Z-
907 Volume Up
908 Volume Down
909 Volume Mute
969 Volume boost increase
970 Volume boost decrease
971 Volume boost Min
972 Volume boost Max
922 DVD Title Menu
923 DVD Root Menu
924 DVD Subtitle Menu
925 DVD Audio Menu
926 DVD Angle Menu
927 DVD Chapter Menu
928 DVD Menu Left
929 DVD Menu Right
930 DVD Menu Up
931 DVD Menu Down
932 DVD Menu Activate
933 DVD Menu Back
934 DVD Menu Leave
943 Boss key
948 Player Menu (short)
949 Player Menu (long)
950 Filters Menu
886 Options
951 Next Audio
952 Prev Audio
953 Next Subtitle
954 Prev Subtitle
955 On/Off Subtitle
2302 Reload Subtitles
956 Next Audio (OGM)
957 Prev Audio (OGM)
958 Next Subtitle (OGM)
959 Prev Subtitle (OGM)
960 Next Angle (DVD)
961 Prev Angle (DVD)
962 Next Audio (DVD)
963 Prev Audio (DVD)
964 Next Subtitle (DVD)
965 Prev Subtitle (DVD)
966 On/Off Subtitle (DVD)
32769 Tearing Test
32778 Remaining Time
32770 Toggle Pixel Shader
32779 Toggle Direct3D fullscreen
32780 Goto Prev Subtitle
32781 Goto Next Subtitle
32782 Shift Subtitle Left
32783 Shift Subtitle Right
32784 Display Stats
24000 Subtitle Delay -
24001 Subtitle Delay +
808 Save thumbnails
*/


The HTTP library:
To enable the HTTP interface, click "View/Options", then in the "Player" menu chose "Web Interface".
Check "Listen on port:", port number is 13579. The latest version includes UrlDownloadToVar by olfen

MPCHTTP.ahk
; Media Player Classic Home Cinema Function Library by Specter333
; A complete list of HTTP functins can be found at 
; http://www.autohotkey.com/forum/viewtopic.php?p=490310#490310
; Use HTTP functions to control Media Player Classic Home Cinema with out it being active.
; Home page, http://mpc-hc.sourceforge.net/
; To enable the HTTP interface, click View/Options, then in the Player menu chose Web Interface.
; Check "Listen on port:", port number is 13579.

MPCHTTP_Play(ip,port) ; localhost:13579
	{
	url = http://%ip%:%port%/command.html?wm_command=887 
	MPCUrlDownloadToVar(url)
	}
MPCHTTP_Pause(ip,port)
	{
	url = http://%ip%:%port%/command.html?wm_command=888
	MPCUrlDownloadToVar(url)
	}
MPCHTTP_PlayPause(ip,port)
	{
	url = http://%ip%:%port%/command.html?wm_command=889
	MPCUrlDownloadToVar(url)
	}
MPCHTTP_Stop(ip,port)
	{
	url = http://%ip%:%port%/command.html?wm_command=890
	MPCUrlDownloadToVar(url)
	}
MPCHTTP_FullScreen(ip,port)
	{
	url = http://%ip%:%port%/command.html?wm_command=830
	MPCUrlDownloadToVar(url)
	}
MPCHTTP_JumpForward(ip,port)
	{ 
   	url = http://%ip%:%port%/command.html?wm_command=902
	MPCUrlDownloadToVar(url)
	}
MPCHTTP_JumpBackward(ip,port)
	{     
	url = http://%ip%:%port%/command.html?wm_command=901
	MPCUrlDownloadToVar(url)
	}
MPCHTTP_PlayFaster(ip,port)
	{     
	url = http://%ip%:%port%/command.html?wm_command=895
	MPCUrlDownloadToVar(url)
	}
MPCHTTP_PlaySlower(ip,port)
	{     
	url = http://%ip%:%port%/command.html?wm_command=894
	MPCUrlDownloadToVar(url)
	}
MPCHTTP_VolumeUp(ip,port)
	{     
	url = http://%ip%:%port%/command.html?wm_command=907
	MPCUrlDownloadToVar(url)
	}
MPCHTTP_VolumeDown(ip,port)
	{     
	url = http://%ip%:%port%/command.html?wm_command=908
	MPCUrlDownloadToVar(url)
	}
MPCHTTP_Mute(ip,port)
	{     
	url = http://%ip%:%port%/command.html?wm_command=909
	MPCUrlDownloadToVar(url)
	}
MPCHTTP_RootMenu(ip,port)
	{     
	url = http://%ip%:%port%/command.html?wm_command=923
	MPCUrlDownloadToVar(url)
	}
MPCHTTP_Exit(ip,port)
	{     
	url = http://%ip%:%port%/command.html?wm_command=816
	MPCUrlDownloadToVar(url)
	}
MPCHTTP(ip,port,msg)
	{     
	url = http://%ip%:%port%/command.html?wm_command=%msg%
	MPCUrlDownloadToVar(url)
	}	



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;  UrlDownloadToVar by olfen 
; http://www.autohotkey.com/forum/viewtopic.php?p=64230#64230
MPCUrlDownloadToVar(URL, Proxy="", ProxyBypass="") {
AutoTrim, Off
hModule := DllCall("LoadLibrary", "str", "wininet.dll")

If (Proxy != "")
AccessType=3
Else
AccessType=1
;INTERNET_OPEN_TYPE_PRECONFIG                    0   // use registry configuration
;INTERNET_OPEN_TYPE_DIRECT                       1   // direct to net
;INTERNET_OPEN_TYPE_PROXY                        3   // via named proxy
;INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY  4   // prevent using java/script/INS

io_hInternet := DllCall("wininet\InternetOpenA"
, "str", "" ;lpszAgent
, "uint", AccessType
, "str", Proxy
, "str", ProxyBypass
, "uint", 0) ;dwFlags

iou := DllCall("wininet\InternetOpenUrlA"
, "uint", io_hInternet
, "str", url
, "str", "" ;lpszHeaders
, "uint", 0 ;dwHeadersLength
, "uint", 0x80000000 ;dwFlags: INTERNET_FLAG_RELOAD = 0x80000000 // retrieve the original item
, "uint", 0) ;dwContext

If (ErrorLevel != 0 or iou = 0) {
DllCall("FreeLibrary", "uint", hModule)
return 0
}

VarSetCapacity(buffer, 512, 0)
VarSetCapacity(NumberOfBytesRead, 4, 0)
Loop
{
  irf := DllCall("wininet\InternetReadFile", "uint", iou, "uint", &buffer, "uint", 512, "uint", &NumberOfBytesRead)
  NOBR = 0
  Loop 4  ; Build the integer by adding up its bytes. - ExtractInteger
    NOBR += *(&NumberOfBytesRead + A_Index-1) << 8*(A_Index-1)
  IfEqual, NOBR, 0, break
  ;BytesReadTotal += NOBR
  DllCall("lstrcpy", "str", buffer, "uint", &buffer)
  res = %res%%buffer%
}
StringTrimRight, res, res, 2

DllCall("wininet\InternetCloseHandle",  "uint", iou)
DllCall("wininet\InternetCloseHandle",  "uint", io_hInternet)
DllCall("FreeLibrary", "uint", hModule)
AutoTrim, on
return, res
}

Here is the complete list of commands, MPC-HTTP Commands
<option value="800">Open File
<option value="801">Open DVD
<option value="802">Open Device
<option value="805">Save As

<option value="806">Save Image
<option value="807">Save Image (auto)
<option value="809">Load Subtitle
<option value="810">Save Subtitle
<option value="804">Close
<option value="814">Properties
<option value="816">Exit
<option value="889">Play/Pause
<option value="887">Play
<option value="888">Pause
<option value="890">Stop
<option value="891">Framestep
<option value="892">Framestep back
<option value="893">Go To
<option value="895">Increase Rate
<option value="894">Decrease Rate
<option value="896">Reset Rate

<option value="905">Audio Delay +10ms
<option value="906">Audio Delay -10ms
<option value="900">Jump Forward (small)
<option value="899">Jump Backward (small)
<option value="902">Jump Forward (medium)
<option value="901">Jump Backward (medium)
<option value="904">Jump Forward (large)
<option value="903">Jump Backward (large)
<option value="898">Jump Forward (keyframe)
<option value="897">Jump Backward (keyframe)
<option value="921">Next
<option value="920">Previous
<option value="919">Next Playlist Item
<option value="918">Previous Playlist Item
<option value="817">Toggle Caption&Menu
<option value="818">Toggle Seeker

<option value="819">Toggle Controls
<option value="820">Toggle Information
<option value="821">Toggle Statistics
<option value="822">Toggle Status
<option value="823">Toggle Subresync Bar
<option value="824">Toggle Playlist Bar
<option value="825">Toggle Capture Bar
<option value="826">Toggle Shader Editor Bar
<option value="827">View Minimal
<option value="828">View Compact
<option value="829">View Normal
<option value="830">Fullscreen
<option value="831">Fullscreen (w/o res.change)
<option value="832">Zoom 50%
<option value="833">Zoom 100%
<option value="834">Zoom 200%
<option value="967">Zoom Auto Fit

<option value="860">Next AR Preset
<option value="835">VidFrm Half
<option value="836">VidFrm Normal
<option value="837">VidFrm Double
<option value="838">VidFrm Stretch
<option value="839">VidFrm Inside
<option value="840">VidFrm Outside
<option value="884">Always On Top
<option value="861">PnS Reset
<option value="862">PnS Inc Size
<option value="864">PnS Inc Width
<option value="866">PnS Inc Height
<option value="863">PnS Dec Size
<option value="865">PnS Dec Width
<option value="867">PnS Dec Height
<option value="876">PnS Center
<option value="868">PnS Left

<option value="869">PnS Right
<option value="870">PnS Up
<option value="871">PnS Down
<option value="872">PnS Up/Left
<option value="873">PnS Up/Right
<option value="874">PnS Down/Left
<option value="875">PnS Down/Right
<option value="877">PnS Rotate X+
<option value="878">PnS Rotate X-
<option value="879">PnS Rotate Y+
<option value="880">PnS Rotate Y-
<option value="881">PnS Rotate Z+
<option value="882">PnS Rotate Z-
<option value="907">Volume Up
<option value="908">Volume Down
<option value="909">Volume Mute
<option value="969">Volume boost increase

<option value="970">Volume boost decrease
<option value="971">Volume boost Min
<option value="972">Volume boost Max
<option value="922">DVD Title Menu
<option value="923">DVD Root Menu
<option value="924">DVD Subtitle Menu
<option value="925">DVD Audio Menu
<option value="926">DVD Angle Menu
<option value="927">DVD Chapter Menu
<option value="928">DVD Menu Left
<option value="929">DVD Menu Right
<option value="930">DVD Menu Up
<option value="931">DVD Menu Down
<option value="932">DVD Menu Activate
<option value="933">DVD Menu Back
<option value="934">DVD Menu Leave
<option value="943">Boss key

<option value="948">Player Menu (short)
<option value="949">Player Menu (long)
<option value="950">Filters Menu
<option value="886">Options
<option value="951">Next Audio
<option value="952">Prev Audio
<option value="953">Next Subtitle
<option value="954">Prev Subtitle
<option value="955">On/Off Subtitle
<option value="2302">Reload Subtitles
<option value="956">Next Audio (OGM)
<option value="957">Prev Audio (OGM)
<option value="958">Next Subtitle (OGM)
<option value="959">Prev Subtitle (OGM)
<option value="960">Next Angle (DVD)
<option value="961">Prev Angle (DVD)
<option value="962">Next Audio (DVD)

<option value="963">Prev Audio (DVD)
<option value="964">Next Subtitle (DVD)
<option value="965">Prev Subtitle (DVD)
<option value="966">On/Off Subtitle (DVD)
<option value="32769">Tearing Test
<option value="32778">Remaining Time
<option value="32770">Toggle Pixel Shader
<option value="32779">Toggle Direct3D fullscreen
<option value="32780">Goto Prev Subtitle
<option value="32781">Goto Next Subtitle
<option value="32782">Shift Subtitle Left
<option value="32783">Shift Subtitle Right
<option value="32784">Display Stats
<option value="24000">Subtitle Delay -
<option value="24001">Subtitle Delay +
<option value="808">Save thumbnails

Also check out my VLC Media Player HTTP Function Library,
jballi's Winamp functions,
And to control your media players with a IR remote just like a DVD or Blu Ray player see the USB-UIRT Function Library.
I you need new version of any scripts I haven't re-uploaded yet feel free to pm me.

pilatomic
  • Members
  • 5 posts
  • Last active: Jan 31 2012 07:31 PM
  • Joined: 11 Nov 2011
Thanks for sharing it :D

XX0
  • Members
  • 32 posts
  • Last active: Dec 12 2014 01:05 PM
  • Joined: 17 Jul 2010
Assuming you use these functions from the PC running MPC-HC, what benefit does this have over using sendmessages like:
SendMessage,0x0111,889,,,ahk_class MediaPlayerClassicW ;Play/Pause


specter333
  • Members
  • 627 posts
  • Last active: Oct 07 2016 07:43 AM
  • Joined: 15 Jan 2007

Assuming you use these functions from the PC running MPC-HC, what benefit does this have over using sendmessages like:

SendMessage,0x0111,889,,,ahk_class MediaPlayerClassicW ;Play/Pause


The only actual benefit it had for me was I was able to find the list of functions and figure out how to make a library. I had to do a lot of searching to find this function list, if I would have found a list for SendMessage I likely would have used that one because (presumably) the HTTP interface is limited in comparison. Same goes for my VLC library, there are better ways but the HTTP was the only one I was able to figure out. :oops:

But now seeing your example, it uses the same command number as the HTTP command. Is that all that is needed to use SendMessage?
I you need new version of any scripts I haven't re-uploaded yet feel free to pm me.

XX0
  • Members
  • 32 posts
  • Last active: Dec 12 2014 01:05 PM
  • Joined: 17 Jul 2010

Is that all that is needed to use SendMessage?

Yes, just leave the 0x0111 and change the next parameter.

specter333
  • Members
  • 627 posts
  • Last active: Oct 07 2016 07:43 AM
  • Joined: 15 Jan 2007

Is that all that is needed to use SendMessage?

Yes, just leave the 0x0111 and change the next parameter.


I messed with it quite a bit last night and the SendMessage works just as good as the HTTP commands. I can't tell if one is any better than the other though.

Then I started trying to use SendMessage with the VLC commands but I can't get those to work. I tried with the HTTP and the RC commands, no luck either way.
I you need new version of any scripts I haven't re-uploaded yet feel free to pm me.

XX0
  • Members
  • 32 posts
  • Last active: Dec 12 2014 01:05 PM
  • Joined: 17 Jul 2010
The sendmessage method probably has less overhead than the HTTP way, but the difference apparently is negligible.

If VLC doesn't respond to the sendmessage is likely due to it using a different parameter than 0x0111, which you can think of as the channel the program listens to.

specter333
  • Members
  • 627 posts
  • Last active: Oct 07 2016 07:43 AM
  • Joined: 15 Jan 2007

If VLC doesn't respond to the sendmessage is likely due to it using a different parameter than 0x0111, which you can think of as the channel the program listens to.


Think I found out why.
<!-- m -->http://www.autohotke... ... 289#430289<!-- m -->
I you need new version of any scripts I haven't re-uploaded yet feel free to pm me.

AnonGuest
  • Guests
  • Last active:
  • Joined: --

If VLC doesn't respond to the sendmessage is likely due to it using a different parameter than 0x0111, which you can think of as the channel the program listens to.


Think I found out why.
http://www.autohotke... ... 289#430289



I followed the link in your post and found this ...


ok...

Last edited by XYZ on Sat Mar 19, 2011 7:18 pm; edited 2 times in total



Note: edited 2 times in total

Let me see if I've got this straight ...
edited twice to end up with a post consisting of ..........

"OK???"


I don't know, maybe it's just me, but I thought it was kind of funny.

:D :lol: :lol: :roll:

specter333
  • Members
  • 627 posts
  • Last active: Oct 07 2016 07:43 AM
  • Joined: 15 Jan 2007

I followed the link in your post and found this ...


ok...

Last edited by XYZ on Sat Mar 19, 2011 7:18 pm; edited 2 times in total



Note: edited 2 times in total

Let me see if I've got this straight ...
edited twice to end up with a post consisting of ..........

"OK???"


I don't know, maybe it's just me, but I thought it was kind of funny.

:D :lol: :lol: :roll:

So do you think they were having trouble with the "O" or the "K"?

Actually that's strange, when I click the link it takes my to the correct post. But here's the comment I was linking to.

Apparently, the newer incarnations of VLC no longer use WM_COMMAND messages to control the program. Winspector (a program to look at windows messages et.al.) does not show any WM_COMMAND activity for the newer VLC 1.0.1.

dmatch


I you need new version of any scripts I haven't re-uploaded yet feel free to pm me.

garry
  • Spam Officer
  • 3219 posts
  • Last active: Sep 20 2018 02:47 PM
  • Joined: 19 Apr 2005
thank you specter333 , I use videolan version 1.1.11, your vlc example works fine, modified here
<!-- m -->http://www.autohotke...topic69260.html<!-- m -->

specter333
  • Members
  • 627 posts
  • Last active: Oct 07 2016 07:43 AM
  • Joined: 15 Jan 2007

thank you specter333 , I use videolan version 1.1.11, your vlc example works fine, modified here
<!-- m -->http://www.autohotke...topic69260.html<!-- m -->


Your quite welcome. I haven't seen that thread before, it could have saved me some time. I've been updating the VLCHTTP library little by little and started using the 'urldownloadtovar' function instead of 'downloadtofile'. I have almost every HTTP function included, I'll post it when I'm done. By the way, just being able to include every HTTP function shows how limited the HTTP interface is compared to the other interfaces which have hundreds of commands available.

For the Media Player Classic HC library. I've found at least one advantage of using SendMessage over HTTP is not having to do any setup with the player. I'll post another library with the SendMessage commands. The HTTP library can still be used to control the player over a network.
I you need new version of any scripts I haven't re-uploaded yet feel free to pm me.

specter333
  • Members
  • 627 posts
  • Last active: Oct 07 2016 07:43 AM
  • Joined: 15 Jan 2007
This is a scipt that allows you to test the MediaPlayerClassicHC.ahk and MPCHTTP.ahk function libraries.

App Media Player Classic HC.ahk

Posted Image

To save me some time this is just a edited command module from the newest version of "Easy Automation AHK", yet to be released. Some buttons and functions wont be active.
I you need new version of any scripts I haven't re-uploaded yet feel free to pm me.

valuex
  • Members
  • 7 posts
  • Last active: Sep 17 2015 01:31 PM
  • Joined: 23 Aug 2013

Is it possible to go to specific time by passing parameter to MediaPlayerClassicHC(893)



garry
  • Spam Officer
  • 3219 posts
  • Last active: Sep 20 2018 02:47 PM
  • Joined: 19 Apr 2005

example to go to specific time MPC

fp=%a_programfiles%\Media Player Classic - Home Cinema\mpc-hc.exe
f1="C:\M_VIDEO\ASIA\Philippines\Sa Kabukiran_Fame Flores_rizucj_pq5NlkpjCGM_35.flv"

SplitPath, fp, name, dir, ext, name_no_ext, drive
Gui,2: Color, ControlColor, Black
edcol=white
btcol=black
a7xx=00:01:00
Gui,2:Add,Edit,c%edcol% right  x10  y10   w70   h20   vGotox ,%a7xx%
Gui,2:Add,Progress,            x10  y40   w70   h20  Disabled Background%btcol%
Gui,2:Add,Text,                xp    yp     wp    hp   cYellow  BackgroundTrans center 0x200 gGoto1X   vGoto1X2   ,GotoX
Gui,2:show, x0 y0 w100 h90,Test MPC-HC
return

2Guiclose:
exitapp


Goto1X:
gui,2:submit,nohide
Process, Exist,%name%
If ErrorLevel
   Process, Close, %PID%
aa=/fixedsize 1500,1200 /startpos %gotox%
run,%fp% %f1% %aa%,,,pid
return