brutus Posted November 9, 2009 Share Posted November 9, 2009 How to use SendInput command from COM interface ? I'm trying to switch channel via SendCommand(CMD_REMOTE_0..9), but this seems to react NOT on the favourites, so I guess I need SendInput. I tried it via SendInput, but nothing happens. How can I change Favourites channels via COM interface ? Thanks ! Quote Link to comment
Tjod Posted November 9, 2009 Share Posted November 9, 2009 SendCommand(11) should change to Fav1. You need the Action IDs from the actions.ini (DVBViewer folder). Quote Link to comment
brutus Posted December 26, 2009 Author Share Posted December 26, 2009 I've made an application via COM interface which will do some remapping of the up/down/left/right/select action. I want to have the left and right button to do jumping while watching a movie/timeshift or recording. For the up and down button I want to have the same behaviour for all kind of playing (timeshift/recording or movie), doing playing an pausing. All works as expected but I've some problems while playing a DVD and when it is in the DVD menu. I can't navigate through the DVD menu, for example selecting a different chapter, because of my remapping. The up action is translated to play action when dvb.isDVD() is true. If there is a method like dvb.isDVDMenu() then I could skip the translation for the up action and so I'm able to go up in the chapter menu. Is there a way to detect when it is in the DVD-menu ? if (!dvb.OSD.isVisible()) { switch (command) { case DVBViewerCMDType.CMD_MOVE_UP: if (dvb.IsTimeshift() || dvb.isMediaplayback() || dvb.isDVD()) { execute = DVBViewerCMDType.CMD_PLAY; } else { execute = DVBViewerCMDType.CMD_TimeShift; } break; case DVBViewerCMDType.CMD_MOVE_DOWN: execute = DVBViewerCMDType.CMD_PAUSE; break; case DVBViewerCMDType.CMD_MOVE_LEFT: if (dvb.IsTimeshift() || dvb.isMediaplayback() || dvb.isDVD()) { execute = DVBViewerCMDType.CMD_STEP_BACK; } else { execute = DVBViewerCMDType.CMD_TimeShift; } break; case DVBViewerCMDType.CMD_MOVE_RIGHT: if (dvb.IsTimeshift() || dvb.isMediaplayback() || dvb.isDVD()) { execute = DVBViewerCMDType.CMD_STEP_FORWARD; } else { execute = DVBViewerCMDType.CMD_TimeShift; } break; case DVBViewerCMDType.CMD_SELECT_ITEM: if (dvb.IsTimeshift()) { execute = DVBViewerCMDType.CMD_SHOW_MINIEPG; } break; } } dvb.SendCommand((int)execute); break; Quote Link to comment
dbraner Posted December 28, 2009 Share Posted December 28, 2009 Why don't you use command.vbs for remapping of keyboard inputs? Quote Link to comment
brutus Posted December 28, 2009 Author Share Posted December 28, 2009 thanks for your advice ! I'm using philips pronto remote TSU9600 (wifi), and before I send keystrokes via my pronto, if DVBViewer doesn't have the focus the keystrokes doesn't affect DVBViewer, I can force it, set always focus to DVBViewer, but with COM I'm always 100% for sure the command will affect DVBViewer. Looking into command.vbs I can't find a solution for my problem, or is there still a solution ? Quote Link to comment
dbraner Posted December 28, 2009 Share Posted December 28, 2009 thanks for your advice !I'm using philips pronto remote TSU9600 (wifi), and before I send keystrokes via my pronto, if DVBViewer doesn't have the focus the keystrokes doesn't affect DVBViewer, I can force it, set always focus to DVBViewer, but with COM I'm always 100% for sure the command will affect DVBViewer. Looking into command.vbs I can't find a solution for my problem, or is there still a solution ? Sorry, I misunderstood what you like to do. Command.vbs is called every time when a user presses a key. But what you like to do is sending keystrokes to DVBViewer. For this COM is the best way if your remote is not supported by one of the plugins available. Have you checked that your remote isn't supported by WinLIRC? The input focus is always a problem if you are using other programs in parallel with DVBViewer. I think there is no way to detect if DVD menu is displayed because this menu is not under control of DVBViewer. For DVBViewer the DVD is in playing state even if the menu is displayed. One - not very easy way - is to handle the DVD menu ActionId in command.vbs and store a new flag in the DVBViewer datamanager. But this technique is not very reliable because you have to reset this flag if the DVD menu is closed. And there is no "close DVD menu" action in DVBViewer. The menu is closed if you select a scene for example and this selection is not under control of DVBViewer. 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.