MediaPortal loses focus - MCE Remote doesn't work (1 Viewer)

emphatic

Design Group
  • Team MediaPortal
  • August 25, 2006
    3,655
    1,124
    Alingsås
    Home Country
    Sweden Sweden
    This is something completely new for me. I've had this installation for a long time and the only thing I've change AFAIK, is installing MePo Tools. This is set to start on Windows start, and while it has been launching itself on top of MediaPortal (which hasn't been set to be always on top), pressing the MCE button on my Microsoft MCE remote has always gotten MediaPortal focused and everything worked.

    But, since yesterday or so, I've now had to connect to my HTPC with a remote keyboard (I'm using RealVNC) everytime I've restarted my HTPC to get MediaPortal to focus. This is of course not very wife friendly and of course, very annoying and unconvenient for me as well. I'm at my wits end here. I've even considered making a script set to autorun when MediaPortal's running that sends an ALT+TAB to focus the application, that's how desperate I'm becoming. ;)

    The only effect the MCE button has now, is starting MediaPortal (because of the app in the system tray) and returning to Basic Home once I've gotten MediaPortal to be focused once again. If it's not focused but running, the button does nothing!

    Could something have happened to my remote config file somehow?

    Could this be something sinister, like a key logger or other malware? Please help if you can.
    Emph
     
    Last edited:

    emphatic

    Design Group
  • Team MediaPortal
  • August 25, 2006
    3,655
    1,124
    Alingsås
    Home Country
    Sweden Sweden
    • Thread starter
    • Moderator
    • #3
    I've made a workaround using Autohotkey. If you don't want to install that should this problem arise for you, you can use my compiled .exe and add it to the autostart folder of Windows 8.1 and above.

    The functionality then is, when you press the Volume Up button on your MCE remote, this will send ALT+TAB to your HTPC, bringing MediaPortal into focus. Much more wife friendly than having a keyboard hooked up etc.

    If you want to use another button on your remote (as this removes the volume functionality of the button) you can alter the first line of the script, but then you need to install AutoHotkey so you can compile the script into an .exe file.

    Code:
    Volume_Up::
      {  
            Send {Alt Down}{Tab} ;Bring up switcher immediately          
            KeyWait, F1, T.5  ; Go to next window; wait .5s before looping
            if (Errorlevel)
           {      
            While ( GetKeyState( "F1","P" ) ) {
                Send {Tab}      
                Sleep, 400 ; wait 400ms before going to next window
            }
        }
            Send {Alt Up} ;Close switcher on hotkey release
    }
    return

    So, for example, if you'd like to use the Mute button, the first line of code is "Volume_Mute::" instead of "Volume_Up::", using the 0 button is "0::" etc.

    The files.zip contains the .ahk and the .exe versions of the above script.


    Disclaimer: I found the script online, and just changed the button from F1 on the keyboard to VolumeUp to fit my needs. I don't claim to be the author of the original script.

    Emph
     

    Attachments

    • Files.zip
      560.8 KB

    Users who are viewing this thread

    Top Bottom