efla Posted September 1, 2008 Share Posted September 1, 2008 Hello, I 'm looking how to launch an external program with the remote control. I'm using the MCE remote control with DVBViewer and I would like to assign a button to launch immediately another program. Is it possible ? Thanks Quote Link to comment
Moses Posted September 1, 2008 Share Posted September 1, 2008 You can use the osd menue editor to add a menue entry in the DVBViewer osd menue that runs an external application. There is no other way to do it completely in DVBViewer. You could use girder or eventghost to receiver the commands from your remote and then use this application to control DVBViewer and run applications. Quote Link to comment
Tjod Posted September 1, 2008 Share Posted September 1, 2008 Is it possible ?Yes via Command.vbs. You have to build a Command.vbs in \DVBViewer\Scripts. Command.vbs sub main(Command) Select Case Command Case 20480 OSD.ExecNewProcess "C:\WINDOWS\notepad.exe", "", False, False Case 20481 OSD.ExecNewProcess "C:\Program Files\DVBViewer\TransEdit.exe", "", False, False Case Else osd.showInfoinTVpic "No action in th Command.vbs for this Action ID.",1000 End Select end sub And than you have to add a command for Action ID 20480 and bigger. Options > Input > Add Group -> select the new Group > And than select a key for the new command. There is no other way to do it completely in DVBViewer.There is much more possible with the DVBViewer Scripts then most people think (DVBViewer COM Interface). Quote Link to comment
Moses Posted September 2, 2008 Share Posted September 2, 2008 (edited) Ooops... I should never say "there is no way" or similar in conjunction with DVBViewer again Edited September 2, 2008 by Moses Quote Link to comment
efla Posted September 3, 2008 Author Share Posted September 3, 2008 Excellent, thanks for your very fast response ! This works great BTW, what means the 2 boolean FALSE at the end of the ExecNewProcess command ? Quote Link to comment
Tjod Posted September 3, 2008 Share Posted September 3, 2008 procedure ExecNewProcess(const ProgramName: WideString; const Params: WideString; Wait: WordBool;LowPriority: WordBool); safecall; Executes a external program. parameters ProgramName the complete path and name of the program to execute Params the parameters for the program. they have to be enclosed in '"' Wait True the DVBViewer waits till the other program has finished False no wait LowPriority True the program will be executed with low windows priority False the program will be executed with normal windows priority The complete description is in the DVBViewer COM Interface.chm (Members Section). Quote Link to comment
SimonP Posted September 7, 2008 Share Posted September 7, 2008 Not knowing what 20480 and 20481 are, should this work with keyboard keys too? I just tried setting it up using F11 and F12 but nothing happens. (I'm on the laptop which has DVBv installed but no remote control hardware.) Quote Link to comment
Tjod Posted September 7, 2008 Share Posted September 7, 2008 Not knowing what 20480 and 20481 areThe Action IDs you used in the Action Editor (thy must be 20480 or bigger).http://www.DVBViewer.info/forum/index.php?...st&p=210492 should this work with keyboard keys too?Yes for the new Actions you can learn Keyboard and Remote keys. Quote Link to comment
SimonP Posted September 7, 2008 Share Posted September 7, 2008 I followed your instructions but it still doesn't work for me. Is this the correct setting in Options? Quote Link to comment
Tjod Posted September 7, 2008 Share Posted September 7, 2008 Should work, is Options > Scripts the scripting engine enabled? If yes, tray if the Command.vbs is started by pressing the key. Add osd.showInfoinTVpic "Test",1000 at the end of the Command.vbs. Is "Test" displayed by pressing the key? Quote Link to comment
topcaser Posted November 16, 2008 Share Posted November 16, 2008 Works great here. Is it also possible to send a key with SendKey command? I have tried this line: SendKeys "%(^N)", True to simulate CTRL + ALT + N but alwas get an error message. OSD.SendKeys is not in the API of class OSD. How is it possible to send the keys? Thanks Quote Link to comment
webmaher Posted January 11, 2012 Share Posted January 11, 2012 Hi This is work great, so add external program to oSD menu and remote work OK ... but how I can disable DVBViewer audio/video, when I switch to XBMC... this is part windowdef.xml: <Window Name="XBMC" Text="XBMC" ID="-4" Parent="0"> <Image>xbmc_bg.png</Image> <Application>C:\Program Files\XBMC\XBMC.exe</Application> <Systemwin>0</Systemwin> </Window> Is possible to add code or arguments or whatever to disable audio/video ... Thanks in advance Quote Link to comment
QBox User Posted January 11, 2012 Share Posted January 11, 2012 Action 16386 is "Disable AudioVideo". SendCommand(16836) in your script should do it. Quote Link to comment
webmaher Posted January 12, 2012 Share Posted January 12, 2012 thanks, @QBox User this works but only when I use remote button directly. when i want start from OSD Main Menu audio and video still work... What can I do about that? Quote Link to comment
Tjod Posted January 12, 2012 Share Posted January 12, 2012 You can use the command line parameter -x ...\DVBViewer.exe" –x16836 Quote Link to comment
webmaher Posted January 12, 2012 Share Posted January 12, 2012 i try this but no success: <Window Name="XBMC" Text="XBMC" ID="-4" Parent="0"> <Image>xbmc_bg.png</Image> <Application>C:\Program Files\DVBViewer\DVBViewer.exe" –x16836</Application> <Application>C:\Program Files\XBMC\XBMC.exe</Application> <Systemwin>0</Systemwin> </Window> I have no programming knowledge and do not know exactly what to do Quote Link to comment
QBox User Posted January 12, 2012 Share Posted January 12, 2012 <Application>C:\Program Files\DVBViewer\DVBViewer.exe" –x16836</Application> There is only a single quote mark in that line. Don't know if it needs two or none. Maybe this: <Application>"C:\Program Files\DVBViewer\DVBViewer.exe" –x16836</Application> Quote Link to comment
webmaher Posted January 12, 2012 Share Posted January 12, 2012 i try with all possible combination but no success Quote Link to comment
Tjod Posted January 12, 2012 Share Posted January 12, 2012 You can't run two programs with one windowdef.xml entry. You have to run a batch or vb script which than runs the two commands. Quote Link to comment
webmaher Posted January 13, 2012 Share Posted January 13, 2012 i have vb script (Command.vbs)and work only with direct remote button ... how can I do this from OSD Main Menu Quote Link to comment
Tjod Posted January 13, 2012 Share Posted January 13, 2012 You have to run a batch or vb script via the menu. And run the two programs from this file. Quote Link to comment
webmaher Posted January 14, 2012 Share Posted January 14, 2012 which tag with path to my vbs script must add to windowdef.xml i try few options with no success Quote Link to comment
hoodadada Posted January 16, 2012 Share Posted January 16, 2012 Hello, What I get that someone wants to lunch another program with the remote control power button. I have USB IR receiver with my DVB card. It's power button lunches it's default program. to change that what I do is: 1- go to desktop where all the shortcuts 2- right click on the default program and select properties. 3- click shortcut tab, and delete the field shortcut key to be (none),then click OK 4- right click on the external program and select properties. 5- click shortcut tab, and activate the field shortcut key and press the power button on the remote control,then click OK I did that after finding that the remote control buttons are mapped to keyboard key/combination of keys. My power button is mapped to ctrl+alt+shift+F6 I hope that's useful. Quote Link to comment
webmaher Posted January 17, 2012 Share Posted January 17, 2012 You have to run a batch or vb script via the menu. And run the two programs from this file. tjod, please help me I have Command.vbs script in folder Scripts and when i push button on remote, XBMC start and DVBViewer audio and video stop and thats OK. But I want also to start XBMC with OSD Main Menu, so If I thinking right I must add a few tags in windowdef.xml file. I have this now: <Window Name="XBMC" Text="XBMC" ID="-4" Parent="0"> <Image>xbmc_bg.png</Image> <Application>C:\Program Files\XBMC\XBMC.exe</Application> <Systemwin>0</Systemwin> </Window> XBMC start OK, but DVB video and audio still work ... so probably I must add link to my Command.vbs script without tag <Application> but I dont know how Please, help me Quote Link to comment
Tjod Posted January 17, 2012 Share Posted January 17, 2012 <Window Name="XBMC" Text="XBMC" ID="-4" Parent="0"> <Image>xbmc_bg.png</Image> <Application>C:\... ...\start.bat</Application> <Systemwin>0</Systemwin> </Window> start.bat start "" C:\Programme\DVBViewer\DVBViewer.exe -c -x16382 start "" C:\Program Files\XBMC\XBMC.exe Quote Link to comment
webmaher Posted January 17, 2012 Share Posted January 17, 2012 thanks very much, Tjod this is a little modified code and work excellent ECHO OFF start /d "C:\Program Files\XBMC" XBMC.exe start /d "C:\Program Files\DVBViewer" DVBViewer.exe -c -x16836 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.