home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Support
Codecs, External Players
Using MPC-HC
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="emueyes" data-source="post: 879436" data-attributes="member: 118200"><p>I did work it out, but also made things a lot more flexible - and, maybe, more complicated - with some scripting using AutoHotKey. I really can't remember what the fix for using the external player dialog box was, I think it was a variation of using quote marks to get everything parsed correctly. I am sure, though, that what I'm doing now works well. Firstly, install AutoHotKey, if you want to use the technique I made up. Then make a script that is called from MP as the player name in the MP external player dialog box, with the single parameter %filename%</p><p> </p><p>I have a situation of having some high quality video, and also some rather poor quality stuff, and wanted to use different players for each type for correct processing. Using this script allows for any number of players or other actions to be taken.</p><p> </p><p>Here is a slightly modified version of what I use:</p><p> </p><p>[CODE]#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.</p><p>SendMode Input ; Recommended for new scripts due to its superior speed and reliability.</p><p>SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.</p><p>DetectHiddenWindows, On</p><p>DetectHiddenText, on</p><p>;#Include MouseAway.ahk</p><p> </p><p> </p><p>var=%1%</p><p>if (var="")</p><p>{</p><p>msgbox, 8208,start-video,No file specified</p><p>Exit</p><p>}</p><p> </p><p>sysget, N, monitorcount</p><p> </p><p>if (N<2)</p><p>{</p><p> msgbox,8208,, Turn the TV on!!</p><p> Exit</p><p>}</p><p> </p><p>FileGetAttrib, Atttributes, %var%</p><p> </p><p>IfInString, Attributes, D ; var is a (presumably DVD) directory</p><p> type="dir"</p><p>else</p><p> SplitPath, var,,,type</p><p> </p><p>;msgbox %var%</p><p>;msgbox %type%</p><p> </p><p>if type in dir,avi,ifo,vob</p><p>{</p><p> MoveMouseAway()</p><p> ;msgbox using potplayer</p><p> run "D:\Program Files (x86)\Daum\PotPlayer\PotPlayerMini.exe" "%var%"</p><p> return</p><p>}</p><p> </p><p> </p><p>if type in mkv,m2ts,ts,mp4</p><p>{</p><p> MoveMouseAway()</p><p> ;msgbox using mpc-hc</p><p> run "D:\Program Files (x86)\MPC-HomeCinema.1.5.2.3456.x86\mpc-hc.exe" "%var%" /play /close /fullscreen /monitor 2</p><p>return</p><p>}</p><p> </p><p> </p><p> </p><p>MoveMouseAway()</p><p>{</p><p> CoordMode, mouse, screen;</p><p> mousemove, 1920,600</p><p>}</p><p>return[/CODE]</p><p> </p><p>Basically the script looks at the type of the file that's passed to it by looking at the filename extension, and then chooses a player based on that file type.</p><p> </p><p>The locations of the players will need changing, of course - note the quotes around the %var% for calling MPC-HC</p><p> </p><p>[CODE]</p><p>run "D:\Program Files (x86)\MPC-HomeCinema.1.5.2.3456.x86\mpc-hc.exe" "%var%" /play /close /fullscreen /monitor 2</p><p>[/CODE]</p><p> </p><p>It's also set up to use a TV as the second monitor; that's easily fixed if there's only the one display.</p><p> </p><p> </p><p>So, if you save the entire code block, fix the player locations and save it as an ahk file - AutoHotKeys file type, it can be called from MP. AutoHotKey also has a compiler, to turn the script into an exe.</p><p> </p><p>I know all that's a lot more than you asked for, hopefully some parts of it will be of help. Post back here if you need a hand.</p></blockquote><p></p>
[QUOTE="emueyes, post: 879436, member: 118200"] I did work it out, but also made things a lot more flexible - and, maybe, more complicated - with some scripting using AutoHotKey. I really can't remember what the fix for using the external player dialog box was, I think it was a variation of using quote marks to get everything parsed correctly. I am sure, though, that what I'm doing now works well. Firstly, install AutoHotKey, if you want to use the technique I made up. Then make a script that is called from MP as the player name in the MP external player dialog box, with the single parameter %filename% I have a situation of having some high quality video, and also some rather poor quality stuff, and wanted to use different players for each type for correct processing. Using this script allows for any number of players or other actions to be taken. Here is a slightly modified version of what I use: [CODE]#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. SendMode Input ; Recommended for new scripts due to its superior speed and reliability. SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. DetectHiddenWindows, On DetectHiddenText, on ;#Include MouseAway.ahk var=%1% if (var="") { msgbox, 8208,start-video,No file specified Exit } sysget, N, monitorcount if (N<2) { msgbox,8208,, Turn the TV on!! Exit } FileGetAttrib, Atttributes, %var% IfInString, Attributes, D ; var is a (presumably DVD) directory type="dir" else SplitPath, var,,,type ;msgbox %var% ;msgbox %type% if type in dir,avi,ifo,vob { MoveMouseAway() ;msgbox using potplayer run "D:\Program Files (x86)\Daum\PotPlayer\PotPlayerMini.exe" "%var%" return } if type in mkv,m2ts,ts,mp4 { MoveMouseAway() ;msgbox using mpc-hc run "D:\Program Files (x86)\MPC-HomeCinema.1.5.2.3456.x86\mpc-hc.exe" "%var%" /play /close /fullscreen /monitor 2 return } MoveMouseAway() { CoordMode, mouse, screen; mousemove, 1920,600 } return[/CODE] Basically the script looks at the type of the file that's passed to it by looking at the filename extension, and then chooses a player based on that file type. The locations of the players will need changing, of course - note the quotes around the %var% for calling MPC-HC [CODE] run "D:\Program Files (x86)\MPC-HomeCinema.1.5.2.3456.x86\mpc-hc.exe" "%var%" /play /close /fullscreen /monitor 2 [/CODE] It's also set up to use a TV as the second monitor; that's easily fixed if there's only the one display. So, if you save the entire code block, fix the player locations and save it as an ahk file - AutoHotKeys file type, it can be called from MP. AutoHotKey also has a compiler, to turn the script into an exe. I know all that's a lot more than you asked for, hopefully some parts of it will be of help. Post back here if you need a hand. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Support
Codecs, External Players
Using MPC-HC
Contact us
RSS
Top
Bottom