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
  #1  
Old 09-17-2014, 06:04 AM
lovingHDTV's Avatar
lovingHDTV lovingHDTV is offline
Sage Icon
 
Join Date: Jul 2003
Posts: 1,019
Eventghost, Plex and SageTV

I'm hoping that someone has been successful in using eventghost to switch between SageTV and Plex.

My attempts today are:

sageTV to Plex
find plex window
bring to front
switch controls from sagetv to plex

And the opposite for plex to sagetv

The issue I'm having is that after the time out period sagetv starts playing a slide show as the screen saver and this bleeds over onto plex because the task bar pops up.

So I turned off the screen saver, but I still get the task bar popping up and messing things up.

So I tried to minimize to tray each app and that worked, but I when I try to return it later, find window cannot find the minimized app.

I'm hoping someone on here has figured out how to do this and can help.

thanks
david
Reply With Quote
  #2  
Old 09-17-2014, 11:02 AM
doodeedoo doodeedoo is offline
Sage User
 
Join Date: Apr 2007
Location: Romeoville, IL
Posts: 21
I cannot speak to the plex side, as I do not use it.

It's been a little while since I looked at eventghost, but I believe you can load the SageTV plugin and send direct commands to Sage to 1. Wake up (Power On) and 2. Maximize window. At the very least, this will allow you to find the window again with eventghost and bring to front, etc.
Reply With Quote
  #3  
Old 09-17-2014, 11:22 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
When i was using SageTV I used a batch-job the would start SageTV enable SAGETV in eventghost. I then would just exit SageTV and Plex would start up and Sage was disabled in eventghost and Plex was enable... and so on when I exited Plex Sage would start-up etc...

Code:
:loop
cd "C:\Program Files (x86)\EventGhost"
c:
EventGhost.exe -e enablesagetv
EventGhost.exe -e disableplex

cd "C:\Program Files (x86)\SageTV\SageTV"
C:
start /w /normal SageTVClient.exe -startup

cd "C:\Program Files (x86)\EventGhost"
c:
EventGhost.exe -e enableplex
EventGhost.exe -e disablesagetv

cd "C:\Program Files (x86)\Plex Home Theater"
c:
"C:\Program Files (x86)\Plex Home Theater\Plex Home Theater.exe"
goto loop
exit
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
Reply With Quote
  #4  
Old 09-17-2014, 11:47 AM
lovingHDTV's Avatar
lovingHDTV lovingHDTV is offline
Sage Icon
 
Join Date: Jul 2003
Posts: 1,019
Quote:
Originally Posted by nyplayer View Post
When i was using SageTV I used a batch-job the would start SageTV enable SAGETV in eventghost. I then would just exit SageTV and Plex would start up and Sage was disabled in eventghost and Plex was enable... and so on when I exited Plex Sage would start-up etc...

Code:
:loop
cd "C:\Program Files (x86)\EventGhost"
c:
EventGhost.exe -e enablesagetv
EventGhost.exe -e disableplex

cd "C:\Program Files (x86)\SageTV\SageTV"
C:
start /w /normal SageTVClient.exe -startup

cd "C:\Program Files (x86)\EventGhost"
c:
EventGhost.exe -e enableplex
EventGhost.exe -e disablesagetv

cd "C:\Program Files (x86)\Plex Home Theater"
c:
"C:\Program Files (x86)\Plex Home Theater\Plex Home Theater.exe"
goto loop
exit
OK I understand the concept here, but where did this run? Windows from the startup directory?

thanks,
david
Reply With Quote
  #5  
Old 09-17-2014, 11:53 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Quote:
Originally Posted by lovingHDTV View Post
OK I understand the concept here, but where did this run? Windows from the startup directory?

thanks,
david
There is a lot of ways to start it. You can create the bat file from the code. You can run it at eventghost startup. You can start it up from a remote button that you train in eventghost to launch the application ... etc
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
Reply With Quote
  #6  
Old 09-17-2014, 12:28 PM
texneus texneus is offline
Sage Aficionado
 
Join Date: Nov 2009
Location: DFW
Posts: 279
I did something like this to switch between Sage & PowerDVD. To get back to SageTV I run an autohotkey script that searches out and kills all open windows then issues a SageTV command line to open it back up from its sleep state. It might be possible to do it all in eventghost, but it wasn't obvious to me. I'll try to remember to post code when I get home tonight.
Reply With Quote
  #7  
Old 09-17-2014, 12:39 PM
Skirge01's Avatar
Skirge01 Skirge01 is offline
SageTVaholic
 
Join Date: Jun 2007
Location: New Jersey
Posts: 2,599
What you want is for EventGhost to trigger the SageTV: PowerOn command, which will bring it out of the system tray. I do this all the time to switch back and forth between apps. Then, continue with whatever other things you want EG to do.
__________________
Server: XP, SuperMicro X9SAE-V, i7 3770T, Thermalright Archon SB-E, 32GB Corsair DDR3, 2 x IBM M1015, Corsair HX1000W PSU, CoolerMaster CM Storm Stryker case
Storage: 2 x Addonics 5-in-3 3.5" bays, 1 x Addonics 4-in-1 2.5" bay, 24TB
Client: Windows 7 64-bit, Foxconn G9657MA-8EKRS2H, Core2Duo E6600, Zalman CNPS7500, 2GB Corsair, 320GB, HIS ATI 4650, Antec Fusion
Tuners: 2 x HD-PVR (HTTP tuning), 2 x HDHR, USB-UIRT
Software: SageTV 7
Reply With Quote
  #8  
Old 09-17-2014, 07:51 PM
texneus texneus is offline
Sage Aficionado
 
Join Date: Nov 2009
Location: DFW
Posts: 279
You can run this script with Autohotkey (http://ahkscript.org/). It will close all open windows and programs except SageTV and things running in the tray. It then checks if the SageTV GUI is running (possibly sleeping). If it is it wakes it up. If it isn't, it starts it and makes sure it's full screen. I run this script to get back to SageTV with Eventghost when PowerDVD exits or on a Green Button press of the remote (or any other event you might define). I do it this way as I don't think there is a way for Eventghost to do it on it's own...

Change the first variable to point to your SageTV.exe. The other variables should work as is unless there is something funky about your install. You should be able to do something similar to sleep SageTV and start Plex.

Code:
;Variables
SageTVPath := "C:\Program Files (x86)\SageTV\SageTV\SageTV.exe"	;Path to SageTV.exe
SageTVPrgWin := "SageTV"		;Title of SageTV Window
SageTVPrgProc := "SageTV.exe"		;Process Title of SageTV

;Closes all open windows except those in the tray, Program Manager, SageTV
;http://www.autohotkey.com/board/topic/69677-close-all-windows-openminimized-browsers-but-not-pwr-off/

WinGet, id, list,,, Program Manager
Loop, %id%
	{
	this_id := id%A_Index% 
    	WinGetClass, this_class, ahk_id %this_id%
	WinGetTitle, this_title, ahk_id %this_id%
	If(this_class != "Shell_traywnd") && (this_class != "Button")	;If class is not Shell_traywnd and not Button
		{							;and is not SageTV
		If (this_title != "SageTV")
			WinClose, ahk_id %this_id%			;Then close it...
		}
	}

;Checks if SageTV is sleeping in the system tray and wakes it up if it is or
;starts it if it is not yet running.

Process, Exist, %SageTVPrgProc%		;Check if SageTV Process is already running
If %ErrorLevel% <> 0
	RunWait, %SageTVPath% -event 43	;Power On SageTV GUI in normal mode if it is...
Else
	{
	Run, %SageTVPath%		;...and if it isn't, then start it
	WinWait, %sageTVPrgWin%		;Wait for the SageTV Window to appear
	Sleep 1500			;Short delay for SageTV to initialize
	}

RunWait, %SageTVPath% -event 97		;Maximize window to full screen

Last edited by texneus; 09-17-2014 at 07:57 PM.
Reply With Quote
  #9  
Old 09-17-2014, 08:36 PM
Skirge01's Avatar
Skirge01 Skirge01 is offline
SageTVaholic
 
Join Date: Jun 2007
Location: New Jersey
Posts: 2,599
That's pretty impressive, but a bit more than I'd want. (Not criticizing at all, just a personal observation.) I did mine a little differently, using EG for everything it could do and taskkill.exe for the one thing EG couldn't (kill a process). I included the exact parameters for taskkill, in case anyone is interested.

I kept expanding EG as different scenarios popped up and couldn't be handled via the remote. It's pretty bullet proof at this point and can recover from every situation I've run across so far. I have EG set up so my Harmony remote can control SageTV, XBMC, Total Media Theater, Windows Media Player, MPC-HC, or VLC. The only thing I haven't done yet is set up the remote to launch each of those programs via button presses; that's primarily because I always need to select the file I want to play back first and that's much easier via the keyboard, anyhow. I think I've posted the entire EG file elsewhere on these forums, but if anyone wants to play around with it, I'll post it again.
Attached Images
File Type: jpg 2014-09-17 22 22 17.jpg (182.4 KB, 268 views)
File Type: jpg 2014-09-17 22 19 59.jpg (106.4 KB, 253 views)
__________________
Server: XP, SuperMicro X9SAE-V, i7 3770T, Thermalright Archon SB-E, 32GB Corsair DDR3, 2 x IBM M1015, Corsair HX1000W PSU, CoolerMaster CM Storm Stryker case
Storage: 2 x Addonics 5-in-3 3.5" bays, 1 x Addonics 4-in-1 2.5" bay, 24TB
Client: Windows 7 64-bit, Foxconn G9657MA-8EKRS2H, Core2Duo E6600, Zalman CNPS7500, 2GB Corsair, 320GB, HIS ATI 4650, Antec Fusion
Tuners: 2 x HD-PVR (HTTP tuning), 2 x HDHR, USB-UIRT
Software: SageTV 7
Reply With Quote
  #10  
Old 09-18-2014, 05:15 AM
lovingHDTV's Avatar
lovingHDTV lovingHDTV is offline
Sage Icon
 
Join Date: Jul 2003
Posts: 1,019
Quote:
Originally Posted by Skirge01 View Post
I think I've posted the entire EG file elsewhere on these forums, but if anyone wants to play around with it, I'll post it again.
If you would do that it would be great. I tried to search for it, but my searching-skills appear to be lacking.

thank you,
david
Reply With Quote
  #11  
Old 09-18-2014, 05:41 AM
ranger ranger is offline
Sage Aficionado
 
Join Date: Nov 2003
Location: Virginia
Posts: 256
I'll have to take another look at my event ghost configuration for the exact details, but I assigned 4 buttons on my remote to start various applications. The PC is primarily for SageTV, so it is running all the time. The sequence to start TotalMedia (XBMC, etc) minimizes the current foreground window and starts the new application. The context for each application has a shutdown sequence defined that closes the application, restores SageTV annd brings it to the foreground. I don't use this functions often, but they work reliably enough.

If this is what you're looking for, let me know and I'll get the details.
Reply With Quote
  #12  
Old 09-18-2014, 09:49 AM
Skirge01's Avatar
Skirge01 Skirge01 is offline
SageTVaholic
 
Join Date: Jun 2007
Location: New Jersey
Posts: 2,599
Quote:
Originally Posted by lovingHDTV View Post
If you would do that it would be great. I tried to search for it, but my searching-skills appear to be lacking.

thank you,
david
Here you go. (Obviously, remove the .txt) Do keep in mind that if you intend to use this actual file, rather than using it as a guide, you'll need to customize the remote commands to work with your own setup. The file itself should be pretty self-explanatory, but if you don't see why I did something, just ask.
Attached Files
File Type: txt HTPC.xml.txt (134.7 KB, 227 views)
__________________
Server: XP, SuperMicro X9SAE-V, i7 3770T, Thermalright Archon SB-E, 32GB Corsair DDR3, 2 x IBM M1015, Corsair HX1000W PSU, CoolerMaster CM Storm Stryker case
Storage: 2 x Addonics 5-in-3 3.5" bays, 1 x Addonics 4-in-1 2.5" bay, 24TB
Client: Windows 7 64-bit, Foxconn G9657MA-8EKRS2H, Core2Duo E6600, Zalman CNPS7500, 2GB Corsair, 320GB, HIS ATI 4650, Antec Fusion
Tuners: 2 x HD-PVR (HTTP tuning), 2 x HDHR, USB-UIRT
Software: SageTV 7
Reply With Quote
  #13  
Old 09-18-2014, 09:52 AM
Skirge01's Avatar
Skirge01 Skirge01 is offline
SageTVaholic
 
Join Date: Jun 2007
Location: New Jersey
Posts: 2,599
Quote:
Originally Posted by ranger View Post
I'll have to take another look at my event ghost configuration for the exact details, but I assigned 4 buttons on my remote to start various applications. The PC is primarily for SageTV, so it is running all the time. The sequence to start TotalMedia (XBMC, etc) minimizes the current foreground window and starts the new application. The context for each application has a shutdown sequence defined that closes the application, restores SageTV annd brings it to the foreground. I don't use this functions often, but they work reliably enough.

If this is what you're looking for, let me know and I'll get the details.
That's pretty much what I did, except I modified SageTV to launch TMT when I choose "play DVD", rather than assigning a button on the remote; when I exit TMT, SageTV is brought back to focus. I rip everything to MKVs, so I don't have a need to use that very often.
__________________
Server: XP, SuperMicro X9SAE-V, i7 3770T, Thermalright Archon SB-E, 32GB Corsair DDR3, 2 x IBM M1015, Corsair HX1000W PSU, CoolerMaster CM Storm Stryker case
Storage: 2 x Addonics 5-in-3 3.5" bays, 1 x Addonics 4-in-1 2.5" bay, 24TB
Client: Windows 7 64-bit, Foxconn G9657MA-8EKRS2H, Core2Duo E6600, Zalman CNPS7500, 2GB Corsair, 320GB, HIS ATI 4650, Antec Fusion
Tuners: 2 x HD-PVR (HTTP tuning), 2 x HDHR, USB-UIRT
Software: SageTV 7
Reply With Quote
  #14  
Old 09-18-2014, 10:07 AM
RonBoyd's Avatar
RonBoyd RonBoyd is offline
Sage Aficionado
 
Join Date: Aug 2009
Location: Denver, Colorado
Posts: 404
Quote:
Originally Posted by Skirge01 View Post
Here you go. (Obviously, remove the .txt)
When I click on this Link, I get a file called "attachment.php." What program is used to open such a file?
Reply With Quote
  #15  
Old 09-18-2014, 10:59 AM
Skirge01's Avatar
Skirge01 Skirge01 is offline
SageTVaholic
 
Join Date: Jun 2007
Location: New Jersey
Posts: 2,599
Quote:
Originally Posted by RonBoyd View Post
When I click on this Link, I get a file called "attachment.php." What program is used to open such a file?
That's what you get for using IE. Just do a SAVE AS and rename it.
__________________
Server: XP, SuperMicro X9SAE-V, i7 3770T, Thermalright Archon SB-E, 32GB Corsair DDR3, 2 x IBM M1015, Corsair HX1000W PSU, CoolerMaster CM Storm Stryker case
Storage: 2 x Addonics 5-in-3 3.5" bays, 1 x Addonics 4-in-1 2.5" bay, 24TB
Client: Windows 7 64-bit, Foxconn G9657MA-8EKRS2H, Core2Duo E6600, Zalman CNPS7500, 2GB Corsair, 320GB, HIS ATI 4650, Antec Fusion
Tuners: 2 x HD-PVR (HTTP tuning), 2 x HDHR, USB-UIRT
Software: SageTV 7
Reply With Quote
  #16  
Old 09-18-2014, 04:33 PM
lovingHDTV's Avatar
lovingHDTV lovingHDTV is offline
Sage Icon
 
Join Date: Jul 2003
Posts: 1,019
After a little tweaking to convert XBMC windows to Plex Home Theater things are working quite nicely.

The only thing left to figure out is why the "If unsuccessful jump to "Restart XBMC" doesn't work. It just hangs there. If I start Plex on boot then it works fine.

thanks!
david

EDIT: Figured it out, had to uncheck stop macro option. Everything working beautifully now.

Last edited by lovingHDTV; 09-18-2014 at 04:41 PM.
Reply With Quote
  #17  
Old 09-18-2014, 09:04 PM
Skirge01's Avatar
Skirge01 Skirge01 is offline
SageTVaholic
 
Join Date: Jun 2007
Location: New Jersey
Posts: 2,599
Quote:
Originally Posted by lovingHDTV View Post
After a little tweaking to convert XBMC windows to Plex Home Theater things are working quite nicely.

The only thing left to figure out is why the "If unsuccessful jump to "Restart XBMC" doesn't work. It just hangs there. If I start Plex on boot then it works fine.

thanks!
david

EDIT: Figured it out, had to uncheck stop macro option. Everything working beautifully now.
Awesome!
__________________
Server: XP, SuperMicro X9SAE-V, i7 3770T, Thermalright Archon SB-E, 32GB Corsair DDR3, 2 x IBM M1015, Corsair HX1000W PSU, CoolerMaster CM Storm Stryker case
Storage: 2 x Addonics 5-in-3 3.5" bays, 1 x Addonics 4-in-1 2.5" bay, 24TB
Client: Windows 7 64-bit, Foxconn G9657MA-8EKRS2H, Core2Duo E6600, Zalman CNPS7500, 2GB Corsair, 320GB, HIS ATI 4650, Antec Fusion
Tuners: 2 x HD-PVR (HTTP tuning), 2 x HDHR, USB-UIRT
Software: SageTV 7
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
Plex Scanner and BMT Agent for SageTV PiX64 SageTV v7 Customizations 1412 11-11-2022 12:35 AM
Eventghost and SageTV receiving IR lewispm Hardware Support 5 03-04-2014 03:42 PM
Roku+Plex = Leaving SageTV? Anyone regret it? IVB The SageTV Community 60 08-29-2013 07:57 PM
Possible to get SageTV to handle my library more like Plex? DAMAC SageTV Mac Edition 0 06-10-2009 10:33 AM
Can't Get Eventghost to Control SageTV cncb SageTV Software 8 10-12-2008 09:10 PM


All times are GMT -6. The time now is 01:24 PM.


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