|
SageTV Customizations This forums is for discussing and sharing user-created modifications for the SageTV application created by using the SageTV Studio or through the use of external plugins. Use this forum to discuss customizations for SageTV version 6 and earlier, or for the SageTV3 UI. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||||
|
||||
Utility: SendMessage v2.2
The SendMessage utility has been upgraded to version 2.2, now allowing multiple messages to be sent to multiple windows with the ability to enclose parameters with spaces in quotes. Version 1 had to be run once for each message sent; v2 can have all messages included as command line parameters to a single run of the exe. This enables 'batching' message commands to have SageTV perform an operation or go to a specific menu when neither of those options are available through a single message command.
Example: SendMessage.exe -C SageApp -N SageWin -m 1258 -W 0 42 56 4 4 4 20 This command sends 6 messages to SageTV, resulting in arriving at the "Archived shows recorded with SageTV" menu. For SageTVClient, use SageClientApp instead of SageApp. For more info on the messages available for SageTV, see the complete list of all SageTV Commands in the SageTV Commands section of the PDF manual in your SageTV directory. (p. 192 for v4.1) If you are using the Hauppauge remote and its irremote.ini file to control SageTV, then you do not need this utility; see SendMsg() in updated Hauppauge IR software SageTV v4.1 currently ships with SendMessage v2.2. 11-22-05, new for v2.1
- Andy Note: This utility should already be in your SageTV install directory.
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#2
|
||||
|
||||
Sending messages to windows with spaces in the window name
I was hoping to put together a quick network encoder for my digital TV card (no BDA drivers for it yet) based on SendMessage.exe. Unfortunately the window name is "DigiTV - ", which makes SendMessage throw up the usage window. Is there any way of geting it to search for a window with a space in the window name, or just any window of the specified class?
Thanks |
#3
|
||||
|
||||
Quote:
- Andy
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#4
|
||||
|
||||
Thanks Andy - I will give it a go this evening.
|
#5
|
|||
|
|||
I'm trying to use this utility on the command line to close winamp, but I always get the help dialog. This is what I'm trying to send:
sendmessage -C "BaseWindow_RootWnd" -N "Winamp 1.x" -M 16 -W 0 I think I have the class name and windowname correct, but not sure. If the class and window names are incorrect, what does it do? Could this be my problem? |
#6
|
||||
|
||||
Which version of SendMessage are you trying? I removed v2.1 above, since the other person decided not to use it & I haven't tested further with it. v2.0 will not work with quotes or spaces in the window/class names.
- Andy
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#7
|
|||
|
|||
Ah, that's probably my problem. I'm trying to use 2.0. Would it be a lot of work to change to allow spaces? If you don't have the time, could I get the source so I can add it?
|
#8
|
||||
|
||||
Attached to this post is v2.1 again. If you try it out, please let me know how it works with quoted parameters containing spaces...
If I get no feedback, I'll be removing it again in a day or so. If you tell me that it works, I'll remove the attachment & make v2.1 generally available elsewhere. - Andy
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#9
|
|||
|
|||
Well, I'm still having problems. I'm sure it works, but I'm not sure what I'm doing wrong. I'm just trying to close winamp using the following.
sendmessage -C "BaseWindow_RootWnd" -N "Winamp 1.x" -M 16 -W 0 I also tried -> sendmessage -C "BaseWindow_RootWnd" -N "Winamp 5.112" -M 16 -W 0 and still no luck; it just keeps giving me the help dialog box. I'm also using spy++ to get the window name and class name. In what cases will the help dialog appear? Cheers and thanks for the help. |
#10
|
||||
|
||||
The usage dialog appears if there are no parameters, an unrecognized parameter, or no message was sent for whatever reason... of course, I never added code to explain which of those conditions occurred.
Anyway: please read the usage dialog a little more closely; you are missing the lParam parameter, since it wasn't specified directly with the -L parameter or indirectly as another number at the end of the list. So, you are getting a valid dialog that is trying to point out the usage. If it still doesn't work after that, then either there is a problem with the window and/or class names, or my changes to allow quoted params isn't working correctly. - Andy
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#11
|
|||
|
|||
Well, still having problems with winamp, so I decided to try something simpler (notepad) and was successful issuing the WM_CLOSE with the spaces in the WindowName.
sendmessage -N "Untitled - Notepad" -C Notepad -M 16 0 0 This tells me that maybe I have the incorrect WindowName or ClassName...or something. Thanks. I'll continue looking into my specific issue, but it appears to be working. Edit: I just figured it out. I thought the classname was the windowname and vis versa...ugh. Here they are for windows media and winamp. Winamp: sendmessage "Winamp v1.x" "Winamp 5.11" 16 0 0 Windows Media Player: sendmessage "WMPlayerApp" "Windows Media Player" 16 0 0 |
#12
|
||||
|
||||
Thanks for letting me know it works. I gave the SendMessage discussion its own thread now, with v2.1 available in the first post.
- Andy
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#13
|
|||
|
|||
Actually, If I can make another request.
Instead of displaying the parameter dialog box when the sendmessage fails (not because of bad params), have it just not do anything and maybe just return a dos type return code. The help dialog should probably be only reserved for poorly fomatted commands. The reason I ask is that I occasionally send a blind message, but the window may or may not be available and that's okay. The problem now is that it pops up the help dialog when the window is not available. |
#14
|
||||
|
||||
I can do something like that and/or add a 'quiet' option to never display the usage dialog -- but it will have to wait several days. Not much will get done around here over Thanksgiving.
- Andy
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#15
|
|||
|
|||
That would be great. I'm not in a hurry as I'll be just as busy.
|
#16
|
||||
|
||||
Updated for v2.2
Now that Thanksgiving has been over for at least a couple days, I promptly got back to updating this program; see the first post for the download. Changes:
12-03-05, new for v2.2
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#17
|
|||
|
|||
Great, I'll give it a try tonight.
|
#18
|
|||
|
|||
OK, I'm a bit frustrated now... i can't seem to get Sage to respond to any messages. I've tried from Girder using the SendMessage plugin (Message number 1258, wparam 0, lparam 5 for example) and from SendMessage (2.2) with no luck.
Do i need to configure anything in sage to listen for windows messages? I'm trying something very simple, just trying to use "down" a bunch of times... no luck: SendMessage -C SageApp -N SageWin -m 1258 -W 0 5 5 5 Nothing. I'm running sage 4.1.4 w/ the latest SageMCE 16x9 STV. TIA, Jeff
__________________
SageTV 4.1.10 w/ SageMC16x9 TheaterTek 2.2.1 P4 2.6 Ghz, 768 MB RAM, 80 GB NVidia 6600GT, M-Audio Delta Dio 24/96, Sony DVD, DIGN case w/ VFD |
#19
|
||||
|
||||
Is this for a client? If so you have to use SageClientApp instead of SageApp.
There isn't anything to configure inside SageTV. If it gets a command that it knows how to respond to, it will do so. - Andy
__________________
SageTV Open Source v9 is available. - Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1. - Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus - HD Extenders: A) FAQs B) URC MX-700 remote setup Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request. |
#20
|
|||
|
|||
It's for server... actually, i rebooted my machine and now SendMessage is working fine. I think something got messed up by Girder.
Girder is not working properly. Not sure why. Time to head over to the girder forums! Thanks
__________________
SageTV 4.1.10 w/ SageMC16x9 TheaterTek 2.2.1 P4 2.6 Ghz, 768 MB RAM, 80 GB NVidia 6600GT, M-Audio Delta Dio 24/96, Sony DVD, DIGN case w/ VFD |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|