SageTV Community  

Go Back   SageTV Community > SageTV Products > SageTV Software
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Software Discussion related to the SageTV application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the SageTV software application should be posted here. (Check the descriptions of the other forums; all hardware related questions go in the Hardware Support forum, etc. And, post in the customizations forum instead if any customizations are active.)

Reply
 
Thread Tools Search this Thread Display Modes
  #21  
Old 10-07-2019, 06:02 PM
Mugsy Mugsy is offline
Sage User
 
Join Date: Aug 2019
Location: Houston
Posts: 35
Quote:
Originally Posted by wnjj View Post
How about posting your batch file so we can take a look? The example shows -W but the section I posted says to use lParam. Maybe try -L instead of -P
My bat file:

SendMessage.exe -c WinClass -N WinName -m 1024 2

("2" for Left arrow.)

I tried several variations as well. All it does is give me a popup window listing the commands and usage, but nothing in terms of explanation.
Reply With Quote
  #22  
Old 10-07-2019, 06:06 PM
Mugsy Mugsy is offline
Sage User
 
Join Date: Aug 2019
Location: Houston
Posts: 35
Quote:
Originally Posted by JustFred View Post
According to the List Of All SageTV Commands, sending Event # 63 jumps to "LiveTV". See Appendix D, and then specifically page 224 in the user manual.
I haven't quite figured out how to send "events".

Using "SageTV.exe -event 63" on the command line or in a bat file fails to launch the program.
Reply With Quote
  #23  
Old 10-07-2019, 06:45 PM
wnjj wnjj is online now
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
Quote:
Originally Posted by Mugsy View Post
My bat file:

SendMessage.exe -c WinClass -N WinName -m 1024 2

("2" for Left arrow.)

I tried several variations as well. All it does is give me a popup window listing the commands and usage, but nothing in terms of explanation.
Try:

Code:
SendMessage.exe -C SageApp -N SageWin -m 1258 -W 0 2
You needed the app and window names need to be "SageApp" and "SageWin" and the -m setting to be 1258, not 1024.

Last edited by wnjj; 10-07-2019 at 07:40 PM.
Reply With Quote
  #24  
Old 10-07-2019, 06:56 PM
wnjj wnjj is online now
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
Quote:
Originally Posted by Mugsy View Post
I haven't quite figured out how to send "events".

Using "SageTV.exe -event 63" on the command line or in a bat file fails to launch the program.
Running that shouldn't launch the program. It needs to already be running. After it's running, calling it with the -event 63 option "talks" to the already running instance (basically another SageTV.exe program runs, sends a message then exits). The SendMessage.exe program does the same thing as the -event option but allows for more than one code in sequence.
Reply With Quote
  #25  
Old 10-08-2019, 04:45 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by Mugsy View Post
If you could do that, that would be awesome.

TIA
I'll be traveling this weekend. I'll look at it when I get back.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #26  
Old 10-08-2019, 01:14 PM
Mugsy Mugsy is offline
Sage User
 
Join Date: Aug 2019
Location: Houston
Posts: 35
Quote:
Originally Posted by wnjj View Post
Try:

Code:
SendMessage.exe -C SageApp -N SageWin -m 1258 -W 0 2
You needed the app and window names need to be "SageApp" and "SageWin" and the -m setting to be 1258, not 1024.
Thx for the reply. That ALMOST gets me what I want. (Is there a list somewhere of what "m" values do?)

For the bat file to work, SageTV.exe must already be running and on the Main Menu.

I tried adding "SageTV.exe" to the bat file to launch it first, but the "SendMessage" executes too soon.

I need a single bat file (or shortcut) that opens Sage and goes directly to Live TV.
Reply With Quote
  #27  
Old 10-08-2019, 02:35 PM
wnjj wnjj is online now
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
Quote:
Originally Posted by Mugsy View Post
Thx for the reply. That ALMOST gets me what I want. (Is there a list somewhere of what "m" values do?)

For the bat file to work, SageTV.exe must already be running and on the Main Menu.

I tried adding "SageTV.exe" to the bat file to launch it first, but the "SendMessage" executes too soon.

I need a single bat file (or shortcut) that opens Sage and goes directly to Live TV.
That 'm' value is specific to sending user event messages to SageTV and is coded into the .exe here: https://github.com/google/sagetv/blo...cher.cpp#L1522

I'm not sure how to wait until the message loop is up and ready. Depending upon how immediate you need it to be, you could put a fixed delay in the batch file between the SageTV.exe call and the SendMessage.exe call. Something like this:
Code:
timeout /t 60
This will wait 60 seconds (or you can press a key to skip).

Alternatively there may be a way to detect when SageTV is ready but it may involve something more complex like checking for a logfile timestamp or contents to change. A plugin may be simpler at that point.
Reply With Quote
  #28  
Old 10-08-2019, 03:36 PM
Mugsy Mugsy is offline
Sage User
 
Join Date: Aug 2019
Location: Houston
Posts: 35
Quote:
Originally Posted by wnjj View Post
Something like this:
Code:
timeout /t 60
This will wait 60 seconds (or you can press a key to skip).
Thanks. That was a great idea, but... "Windows". Need I say more?

Here is the bat file I created:

Code:
SageTV.exe
timeout /t 20
SendMessage.exe -C SageApp -N SageWin -m 1258 -W 0 63
(I decided to go with event "63" instead of Left arrow. More likely to work every time.)

Looks like it would work, no? No. Windows launches SageTV.exe, then waits for it to close before executing the next two lines (I thought "SendMessage" was being sent "too soon", but it's actually being sent too LATE!)

So unless there's a way to do it all in one command, I'm afraid this method just won't work.
Reply With Quote
  #29  
Old 10-08-2019, 04:03 PM
wnjj wnjj is online now
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
Quote:
Originally Posted by Mugsy View Post
Thanks. That was a great idea, but... "Windows". Need I say more?

Here is the bat file I created:

Code:
SageTV.exe
timeout /t 20
SendMessage.exe -C SageApp -N SageWin -m 1258 -W 0 63
(I decided to go with event "63" instead of Left arrow. More likely to work every time.)

Looks like it would work, no? No. Windows launches SageTV.exe, then waits for it to close before executing the next two lines (I thought "SendMessage" was being sent "too soon", but it's actually being sent too LATE!)

So unless there's a way to do it all in one command, I'm afraid this method just won't work.
Add 'start /b' before SageTV.exe and it won't wait for it to finish.

Code:
start /b SageTV.exe
timeout /t 20
SendMessage.exe -C SageApp -N SageWin -m 1258 -W 0 63
Reply With Quote
  #30  
Old 10-08-2019, 05:27 PM
Mugsy Mugsy is offline
Sage User
 
Join Date: Aug 2019
Location: Houston
Posts: 35
Quote:
Originally Posted by wnjj View Post
Add 'start /b' before SageTV.exe and it won't wait for it to finish.
Hey! That worked!

What does the "start /b" do?
Reply With Quote
  #31  
Old 10-08-2019, 05:46 PM
wnjj wnjj is online now
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
Quote:
Originally Posted by Mugsy View Post
Hey! That worked!

What does the "start /b" do?
Good deal.

start means run the program without waiting to return to the batch file. The '/b' means run the program without opening another console. You can see this by running "start dir" and "start /b dir" from a CMD prompt to see the difference.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Modems and switches rfeyer Hardware Support 6 04-17-2017 02:48 PM
I have a question about switches. rnadeau Hardware Support 29 07-10-2012 08:57 PM
Change JVM switches CadErik General Discussion 0 12-30-2008 01:40 AM
Two ATX Power Switches? EdwardATeller Hardware Support 4 04-13-2008 02:31 PM
Routers, switches, et. al. ToonGal Hardware Support 23 03-13-2004 11:11 PM


All times are GMT -6. The time now is 10:29 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.