Controlling SageTV Using Windows Messages 5/6/2004 Copyright 2004, SageTV, LLC SageTV can receive all of its commands using Windows Messages. You can also use the SageTV.exe or SageTVClient.exe applications to do this: An example of using the .EXE send the Left command is: SageTV.exe -event 2 The SendMessage Windows API call can also be used for this: The window class to use is "SageApp" for the SageTV application and "SageClientApp" for the SageTVClient application. The window name is "SageWin" for both of them. The message ID is WM_USER + 234 The event code for the corresponding command is read from the lParam message parameter. (I use it for both the wParam & lParam in the example below) An example of using this API call in C to send the Left command is: void SendSageTVCommand(int eventCode) { HWND thewin = FindWindow("SageApp", "SageWin"); if (thewin) SendMessage(thewin, WM_USER + 234, eventCode, eventCode); } SendSageTVCommand(2); // 2 is the event code for Left Here's the list of the event codes for all of the SageTV V2.0 Commands: Left 2 Right 3 Up 4 Down 5 Pause 6 Play 7 Skip Fwd/Page Right 8 Skip Bkwd/Page Left 9 Time Scroll 10 Channel Up/Page Up 11 Channel Down/Page Down 12 Volume Up 13 Volume Down 14 TV 15 Play Faster 16 Play Slower 17 Guide 18 Power 19 Select 20 Watched 21 Favorite 22 Don't Like 23 Info 24 Record 25 Mute 26 Full Screen 27 Home 28 Options 29 Num 0 30 Num 1 31 Num 2 32 Num 3 33 Num 4 34 Num 5 35 Num 6 36 Num 7 37 Num 8 38 Num 9 39 Search 40 Setup 41 Library 42 Power On 43 Power Off 44 Mute On 45 Mute Off 46 Aspect Ratio Fill 47 Aspect Ratio 4x3 48 Aspect Ratio 16x9 49 Aspect Ratio Source 50 Right/Volume Up 51 Left/Volume Down 52 Up/Channel Up 53 Down/Channel Down 54 Page Up 55 Page Down 56 Page Right 57 Page Left 58 Play/Pause 59 Previous Channel 60 Skip Fwd #2 61 Skip Bkwd #2 62 Live TV 63 DVD Reverse Play 64 DVD Next Chapter 65 DVD Prev Chapter 66 DVD Menu 67 DVD Title Menu 68 DVD Return 69 DVD Subtitle Change 70 DVD Subtitle Toggle 71 DVD Audio Change 72 DVD Angle Change 73 DVD 74 Back 75 Forward 76 Customize 77 Custom1 78 Custom2 79 Custom3 80 Custom4 81 Custom5 82 Delete 83 Music Jukebox 84 Recording Schedule 85 SageTV Recordings 86 Picture Library 87 Video Library 88 Stop 89