Improvements discussion (1 Viewer)

framug

Super Moderator
  • Team MediaPortal
  • January 31, 2005
    5,884
    1,956
    South of France
    Home Country
    France France
    Re : Re: MultiShortcut plugin.

    hey framug, i was wondering, could you make it that the words that start with # in the arguments string (as configured) are replaced before starting the program with their property values..
    I suppose better would be to create new parameters for that because, if someone call a specific .exe wich need #WhatTheExeWant as param, we are dead.
    - MultiShortcut config is a PropertyGrid then, I don't see another way than create a button on first config form launching another config Form.
    - Otherwise, another boolean just under arguments string indicate it has to be replaced by property value.
    Second proposal would be enough for you ?

    so for example i can set this as argument in multishortcut configuration: "#TestingStartPage #TestingZoom". then before calling multishortcut window, i would set those two gui properties to for example "www.google.com" and "100" and the program will be called with those arguments..

    thanks :)
    How do you see the way for storing theses properties values ?
    Inside the XmlConfig file, by hand or by another process filling values before calling MultiShortcut ?
    Or, you need a MultiLine TextBox ? (if another config Form)
    Other ?
     

    SilentException

    Retired Team Member
  • Premium Supporter
  • October 27, 2008
    2,617
    1,130
    Rijeka, Croatia
    Home Country
    Croatia Croatia
    Re: MultiShortcut plugin.

    for me, just a way to execute would suffice. i was thinking this as the enhancement for the infoservice plugin so that the users can choose what browser to open.. plugin will fill properties and call configured multishortcut window..

    second solution (boolean, checkbox) for configuration would also suffice for me :) or

    * implement escape char for the words starting with # in argument field and skip parsing those as gui properties..
    * add something more for strings that are properties, perhaps not only #WhatTheExeWant but something like %GUIPROP%#WhatTheExeWant (that way it can be expanded for other uses, in the future)..

    but i don't think you should over complicate it..
     

    framug

    Super Moderator
  • Team MediaPortal
  • January 31, 2005
    5,884
    1,956
    South of France
    Home Country
    France France
    Re : MultiShortcut plugin.

    Ah, OK, I read too fast your previous post and, missed "GUI" word.
    I understand better what you would like, now.
    I suppose you would fill values by a SetProperty and, MultiShortcut recover value by GetProperty, replacing #arguments string as argument for launching.exe. (Stop me if I'm wrong).
    Then, we have to check if MP GUIPropertyManager is able to provide value other than its own before, for communication between plugins.
    OK, if I'm correct, I need an infoservice dll wich will do it. (Please, send it by email).
    We could use your previous example, if you are OK with or, another one, as you want.
    Then, I will try to do.
    But, holidays are higher priority then if you are not in a hurry...
     

    SilentException

    Retired Team Member
  • Premium Supporter
  • October 27, 2008
    2,617
    1,130
    Rijeka, Croatia
    Home Country
    Croatia Croatia
    Re: Re : MultiShortcut plugin.

    I suppose you would fill values by a SetProperty and, MultiShortcut recover value by GetProperty, replacing #arguments string as argument for launching.exe. (Stop me if I'm wrong).

    That's spot on..

    Then, we have to check if MP GUIPropertyManager is able to provide value other than its own before, for communication between plugins.
    OK, if I'm correct, I need an infoservice dll wich will do it. (Please, send it by email).

    As soon as i have it, i'll send it..

    But, holidays are higher priority then if you are not in a hurry...

    Same here :) Enjoy, we'll talk more next week..
     

    framug

    Super Moderator
  • Team MediaPortal
  • January 31, 2005
    5,884
    1,956
    South of France
    Home Country
    France France
    Re : MultiShortcut plugin.

    But, holidays are higher priority then if you are not in a hurry...

    Same here Enjoy, we'll talk more next week..
    Hi SilentExcept,
    :D hope yours were as fine as mine. :)

    As soon as i have it, i'll send it..

    Some news :

    I uploaded MultiShortcut plugin V2.0 on first post wich should answer your need.
    Don't forget to copy also modified language files.

    Some rules :

    1/ Because of internal MP handling :

    Code:
        /// <summary>
        /// This method returns the value for a given property
        /// </summary>
        /// <param name="tag">property name</param>
        /// <returns>property value</returns>
        public static string GetProperty(string tag)
        {
          string property = string.Empty;
          if (tag != null && tag.IndexOf('#') > -1)
          {
            lock (_properties)
            {          
              _properties.TryGetValue(tag, out property);                    
            }
          }
    
          return property;
        }
    your GUIProperty (defined in MultiShortcut Configuration) has to contains a "#" for it works.

    2/ When boolean is true (blue surrounded in attached screenshot) :
    you can use GUIproperty as Arguments.
    And, you can also mix GUIproperty and constant values in Arguments.

    3/ As usual, both GUIproperty and constants need a blank (space) as separator.

    4/ If I take your example :
    Configure MultiShortcut with "#TestingStartPage #TestingZoom"
    - Your .exe should be called by MultiShortcut with "www.google.com 100" if you had filled them in infoservice.
    - If GUIproperty are not filled, no argument will be passed (ie : "").

    5/ If I take another example (red surrounded in attached screenshot) :
    Configure MultiShortcut with "toto #TestingStartPage tata #TestingZoom titi"
    - Your .exe should be called by MultiShortcut with "toto www.google.com tata 100 titi" if you had filled them in infoservice.
    - If GUIproperty are not filled, your .exe should be called with "toto tata titi"

    Hope it can help you and, if you can send feedback...
    the ball is in your court. ;)

    Regards.
    Franck
     

    Attachments

    • msconfig.JPG
      msconfig.JPG
      66.6 KB

    SilentException

    Retired Team Member
  • Premium Supporter
  • October 27, 2008
    2,617
    1,130
    Rijeka, Croatia
    Home Country
    Croatia Croatia
    Re: MultiShortcut plugin.

    framug, i just compiled it and it's working as expected.

    called the configured multishortcut window from infoservice with gui property as argument #webbrowser.link and it fires firefox with that page open..

    now i need todo it configurable in infoservice :)

    ps. i'm still on rc1 so i cannot confirm your bug vl002001

    thank you!
     

    framug

    Super Moderator
  • Team MediaPortal
  • January 31, 2005
    5,884
    1,956
    South of France
    Home Country
    France France
    Re : MultiShortcut plugin.

    @SilentExcept :
    Thanks for your feedback.

    vl002001 :
    Since no crystal ball, more informations are needed.
    - What kind of exception ?
    - your multishortcut.xml file.
    - Maybe MP logs...
     

    ixian

    MP Donator
  • Premium Supporter
  • August 14, 2007
    320
    56
    55
    Home Country
    United States of America United States of America
    Re: MultiShortcut plugin

    Is there a way to have this plugin run a program when another is terminated?

    Example: I use it to launch Hulu Desktop. Hulu Desktop uses the Windows System volume, which means when it launches it's at max volume (Mediaportal using it's own wave volume control in Windows 7, so system volume needs to be set to max). When you turn the volume down in Hulu Desktop it lowers the system volume, which means when you exist it the volume in Mediaportal is too low.

    There's a command line tool called nitcmd that allows you to set Windows volume to whatever you want - for example, c:\nitcmd.exe sysvolume 65557 sets the volume to max, c:\nitcmd sysvolume 35765 sets it to half, etc.

    Using Multishortcut I can set "Program 1" to nitcmd with the argument to set the volume to half, then "Program 2" launches Hulu Desktop. However when I exit Hulu Desktop the sys volume remains at whatever it was set at. I did have "Program 3" set as nitcmd 65557 to reset the volume to max, however I need that to run only after Program 2 has exited.

    Does this make sense? Is this possible to do with the plugin?
     

    framug

    Super Moderator
  • Team MediaPortal
  • January 31, 2005
    5,884
    1,956
    South of France
    Home Country
    France France
    Re : Re: MultiShortcut plugin

    Does this make sense? Is this possible to do with the plugin?
    Yes, it makes sense and, I will add it.

    In waiting for, I found that German language is not up to date and, some strings are missing.
    Is there a nice German guy who could translate it, please ?

    Code:
        <String id="26">You have to fill at least one ExeFile !</String>
        <String id="27">Virtual Directory should not be true if no exefile filled !</String>
        <String id="28">Restart MediaPortal</String>
        <String id="29">Stop MediaPortal Player</String>
        <String id="30">Start MediaPortal Player</String>
        <String id="31">Restart Player is not possible with Restart MP or, without Stop Player</String>
        <String id="33">External call substitute arguments</String>
        <String id="35">Clear properties after run</String>
        <String id="36">No program launch defined before !</String>
        <String id="37">Run after previous launch ended</String>
     

    Users who are viewing this thread

    Top Bottom