Jump to content

COM SendInput


brutus

Recommended Posts

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 !

Link to comment
  • 1 month later...

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;

Link to comment

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 ?

Link to comment
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.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...