On Start/ On Exit event in Media Portal (1 Viewer)

red5goahead

MP Donator
  • Premium Supporter
  • November 24, 2007
    695
    144
    Italy, North West
    Home Country
    Italy Italy
    Hi all.. :D

    Could be usefull a OnStart / OnExit event features in Media Portal to execute some action entering Media Portal or exiting.

    For example now I use Intelliremote to start a AutoIT executable scripting to change primary monitor . start MP and waiting for its close to restore the previous monitor. So I can't use MpTray for that..

    A onStart / onExit could be usefully for many other purpose. (changhe refresh for example...)

    Code:
    if ProcessExists("mediaportal.exe") Then
    	Exit
    EndIf	
    
    ShellExecute ("D:\Programmi\Team MediaPortal\changeMonitor2AsPrimary.vbs")
    
    Sleep(1000)
    
    RunWait ("D:\Programmi\Team MediaPortal\MediaPortal\mediaportal.exe")
    
    ShellExecute ("D:\Programmi\Team MediaPortal\changeMonitor1AsPrimary.vbs")
     

    red5goahead

    MP Donator
  • Premium Supporter
  • November 24, 2007
    695
    144
    Italy, North West
    Home Country
    Italy Italy
    For example now I use Intelliremote to start a AutoIT executable scripting to change primary monitor

    That's a config\general item, why would you want outside software to do this for you :confused:

    do you mean the monitor selection?

    No, I can't use it because under Vista+Evr and Aero with an Ati card using MP
    on the secondary monitor not the primary I got a lot of stuttering (this is a known problem with Ati card, evr+aero work fine on primary monitor, MPC also work fine with secondary one not Media Portal but MPC is not a media center !). Switch primary monitor to plasma tv before start MP resolve the problem, play worh fine and smooth.

    Startup delay tab could be used to configure an optional external exe or vbs script to launch for custom action like that.
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    You can archive such thing with following simple .bat file:

    Code:
    D:\Programmi\Team MediaPortal\changeMonitor2AsPrimary.vbs
    
    rem delay 1 s
    PING 127.0.0.1 -n 1
    
    D:\Programmi\Team MediaPortal\MediaPortal\mediaportal.exe
    D:\Programmi\Team MediaPortal\changeMonitor1AsPrimary.vbs


    Should work, if not then it needs fixing :)
     

    red5goahead

    MP Donator
  • Premium Supporter
  • November 24, 2007
    695
    144
    Italy, North West
    Home Country
    Italy Italy
    But it already work with a AutoIT script. no problem for that.
    autoit executable wait for MP exit (such as watchdog)
    be better if these script or other ones could be execute from MP
    entering on exiting it. with out other external stuff. Now I must
    launch the autoit excutable form itelliremote (to start MP).
    Would to use MPTray. that'all..
    Imho an event launcher feature could be usefully in many cases.
     

    tomtotom2

    Portal Member
    November 23, 2005
    25
    2
    other possible use

    Hi,

    I'd love such a feature. I`ve got a littel Home cinema and would use it to play some kind of atmospheric Music or Sound-Effect while not watching a movie.

    I's also expand the (let's call it) "Event Controller" to Event Handling before playing a movie etc, as I would love to play a thx or DD trailer before playing of the actual Movie starts, or could use it to controll my light manager, to turn off the light when a movie starts, and turn it on again when it ends.
     

    Users who are viewing this thread

    Top Bottom