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
Installation, configuration support
MCE Remote and its green button...
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="trailboy" data-source="post: 36924" data-attributes="member: 18081"><p>hello all!</p><p></p><p>i could not stand any more MP randomly loosing the focus on startup so i decided to write a small script to force MP to get the focus back.</p><p></p><p>i have seen a few posts on that issue, it looks that i am not the only one. some people fixed it by uninstalling divx6 or any other program that was stealing the focus (from the task bar or anywhere else).</p><p></p><p>it is not my case, i have very few applications installed and non of them are responsible of this random behaviour, it does not even happen every time! and it also only happens on MP startup...</p><p></p><p>i have solved this with the following script written with autoit <a href="http://www.autoitscript.com/autoit3/" target="_blank">http://www.autoitscript.com/autoit3/</a></p><p></p><p>[code]</p><p>;-----------</p><p>;this small script wait for a window to exist and then force it to get the focus</p><p>;-----------</p><p></p><p>;variable needed for the infinite loop</p><p>$i = 0 </p><p></p><p>;start infinite loop, it will never finish... </p><p>;you can manually exit the script from the tray</p><p>Do </p><p></p><p> ;this will make the script to wait for Media Portal window to be opened</p><p> ;the script will wait here until Media Portal is started</p><p> WinWait("Media Portal - ") </p><p></p><p> ;if we get here it's because the Media Portal is open</p><p> ;this will activate (give focus) to Media Portal window </p><p> WinActivate("Media Portal - ", "") </p><p></p><p> ;this will make the script to sleep until the window is not active </p><p> ;the script will wake up again and carry on looping</p><p> WinWaitNotActive("Media Portal - ")</p><p></p><p>;this condition will never happen and will keep the script alive</p><p>;everything starts over again and from the beginning of the loop</p><p>Until $i = 1</p><p></p><p>;-----------</p><p>[/code]</p><p></p><p>i have compiled AutoFocusOnMP.exe for you all, you can get it from here <a href="http://www.lorenyleti.info/test/AutoFocusOnMP.exe" target="_blank">http://www.lorenyleti.info/test/AutoFocusOnMP.exe</a></p><p> </p><p>i run AutoFocusOnMP.exe on windows startup. mptray.exe is there as well listening to my mce remote for the green button to be pushed to launch MP. using mptray.exe you will then be able to open MP from the remote and with AutoFocusOnMP.exe you will make sure MP does not lose the focus.</p><p></p><p>in case MP loses the focus, AutoFocusOnMP.exe will quickly give the focus back to MP. the setting Media Portal Always On Top is not needed any more but it won´t harm anyone either... as you can understand that feature doesn't work every time for me, hence this script!</p><p></p><p>i can not test it when MP is on a secondary screen. i only have 1 monitor. it my work on a multi display setup as well... who knows!</p><p></p><p>this script takes 3580K memory, 00% when waiting and only up to 02% when running (it runs for a few milliseconds only...)</p><p></p><p>suggestions, comments welcome.</p><p></p><p>it works for me, i hope it does for you as well!</p></blockquote><p></p>
[QUOTE="trailboy, post: 36924, member: 18081"] hello all! i could not stand any more MP randomly loosing the focus on startup so i decided to write a small script to force MP to get the focus back. i have seen a few posts on that issue, it looks that i am not the only one. some people fixed it by uninstalling divx6 or any other program that was stealing the focus (from the task bar or anywhere else). it is not my case, i have very few applications installed and non of them are responsible of this random behaviour, it does not even happen every time! and it also only happens on MP startup... i have solved this with the following script written with autoit [url]http://www.autoitscript.com/autoit3/[/url] [code] ;----------- ;this small script wait for a window to exist and then force it to get the focus ;----------- ;variable needed for the infinite loop $i = 0 ;start infinite loop, it will never finish... ;you can manually exit the script from the tray Do ;this will make the script to wait for Media Portal window to be opened ;the script will wait here until Media Portal is started WinWait("Media Portal - ") ;if we get here it's because the Media Portal is open ;this will activate (give focus) to Media Portal window WinActivate("Media Portal - ", "") ;this will make the script to sleep until the window is not active ;the script will wake up again and carry on looping WinWaitNotActive("Media Portal - ") ;this condition will never happen and will keep the script alive ;everything starts over again and from the beginning of the loop Until $i = 1 ;----------- [/code] i have compiled AutoFocusOnMP.exe for you all, you can get it from here [url]http://www.lorenyleti.info/test/AutoFocusOnMP.exe[/url] i run AutoFocusOnMP.exe on windows startup. mptray.exe is there as well listening to my mce remote for the green button to be pushed to launch MP. using mptray.exe you will then be able to open MP from the remote and with AutoFocusOnMP.exe you will make sure MP does not lose the focus. in case MP loses the focus, AutoFocusOnMP.exe will quickly give the focus back to MP. the setting Media Portal Always On Top is not needed any more but it won´t harm anyone either... as you can understand that feature doesn't work every time for me, hence this script! i can not test it when MP is on a secondary screen. i only have 1 monitor. it my work on a multi display setup as well... who knows! this script takes 3580K memory, 00% when waiting and only up to 02% when running (it runs for a few milliseconds only...) suggestions, comments welcome. it works for me, i hope it does for you as well! [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Support
Installation, configuration support
MCE Remote and its green button...
Contact us
RSS
Top
Bottom