SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-14-2009, 04:19 PM
timg11's Avatar
timg11 timg11 is offline
Sage Aficionado
 
Join Date: Sep 2008
Posts: 472
Newbie to Studio - first attempt

I have been informed by SageTV support that SageTV basically does not and can not work properly on a monitor that is not primary due to video driver problems. My HTPC is used for other things than driving the HDTV: the smaller LCD monitor needs to be primary so that windows will not appear on the HDTV which may be turned off or on another video source.

The only solution to this problem that I am aware of is to use Studio to extend SageTV so it will automatically call Windows batch files to switch which monitor is primary. When SageTV goes full-screen, it should cause the HDTV to become the primary monitor. When SageTV is not in full screen mode, or is put to sleep/standby state, the primary monitor should revert to the LCD monitor.

I found a message that showed how to execute a Windows batch file from Studio:
Code:
Fork()
Process = ExecuteProcess("\\ext.cmd", GetFileForSegment(GetMediaFileForAiring(Airing), 0), "\\workingdrectory", false)
From reading the Studio manual, I think I need to create a Listener widget. There is an example for a "Full Screen" listener in tutorial 13.

I have not yet determined how the listener widget actually would call the ExecuteProcess function.

Am I on the right track? Is there an easier way to accomplish what I need to do?
__________________
HD300 extender with (2020 New Build) SageTV 64 bit V9.2.2.903 (service mode), Running on Windows 10 (64 bit), Intel Core i7-10700K CPU, 16G RAM, GIGABYTE Z490 UD motherboard. NVidia GTX1650 Super; Viewsonic LCD on one output and Mitsubishi WD57734 HDTV via DVI/HDMI on other output. HDHomeRun HDHR5-4US tuner, Hauppauge "Siena" 1512 HD-PVR2 connected to Cisco Cable modem from Spectrum, tuned with USB-UIRT.
Reply With Quote
  #2  
Old 05-14-2009, 06:15 PM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Seems to me it might be simpler for your purposes to turn the problem inside out. Instead of having Sage execute a batch file every time it enters or exits full-screen mode, create a batch file you can run from Windows that (among other things) commands Sage to enter/exit full-screen mode. Executing SageTV commands from a command prompt is covered in Appendix D of the SageTV manual (not the Studio manual).

If you need to be able to do it entirely from within Sage, you could probably accomplish that by using the Configurable Main Menu plugin to create a custom menu item without having to delve into Studio.

If Studio is your only option, then yes, you'd need a Listener to intercept the default handling of the Full Screen command and launch your batch file from there using ExecuteProcess. (Although in your case there's no need to pass in the path of a media file as in your sample code.)

Have you ever done any programming before, of any sort? The answer to that will impact your ability to learn Studio quickly (and our ability to give you advice appropriate to your skill level).
__________________
-- Greg
Reply With Quote
  #3  
Old 05-16-2009, 04:46 PM
timg11's Avatar
timg11 timg11 is offline
Sage Aficionado
 
Join Date: Sep 2008
Posts: 472
Greg,

Thanks for the reply. I really want SageTV to handle this directly. If there is a way to run Windows batch commands from the Hauppauge remote, I don't know how to do it. Also, manually changing modes leaves the possibility that the mode will be left in the wrong state when SageTV crashes and forces a reboot, or the system reboots for some other reason.

I have done lots of programming in C, Pascal, Perl, PHP, etc, but not Java.
Can you point me to an example of any existing Studio widget that does something similar to what I want?
__________________
HD300 extender with (2020 New Build) SageTV 64 bit V9.2.2.903 (service mode), Running on Windows 10 (64 bit), Intel Core i7-10700K CPU, 16G RAM, GIGABYTE Z490 UD motherboard. NVidia GTX1650 Super; Viewsonic LCD on one output and Mitsubishi WD57734 HDTV via DVI/HDMI on other output. HDHomeRun HDHR5-4US tuner, Hauppauge "Siena" 1512 HD-PVR2 connected to Cisco Cable modem from Spectrum, tuned with USB-UIRT.
Reply With Quote
  #4  
Old 05-17-2009, 11:07 AM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
Quote:
Originally Posted by timg11 View Post
If there is a way to run Windows batch commands from the Hauppauge remote, I don't know how to do it.
The Configurable Main Menu plugin lets you run a batch file (or other external program) from a SageTV menu item. If you're talking about binding a button on the remote directly to a batch file, without having to navigate menus, there's probably a way to do that with Girder or EventGhost, but I'm not an expert on that.

Quote:
Originally Posted by timg11 View Post
Also, manually changing modes leaves the possibility that the mode will be left in the wrong state when SageTV crashes and forces a reboot, or the system reboots for some other reason.
Sorry, I'm not following your logic on this. If a crash-and-reboot while in full-screen/primary monitor mode is going to be a problem for you, then won't it still be a problem regardless of how you got into that mode? Or are you just worried that if it's too much of a chore to take it out of full-screen mode, people will tend to leave it in full-screen mode when idle?

Quote:
Originally Posted by timg11 View Post
Can you point me to an example of any existing Studio widget that does something similar to what I want?
I don't know of one in the stock STV off the top of my head, but the Studio tutorial on Listeners includes an example of intercepting the Full Screen command.
__________________
-- Greg
Reply With Quote
  #5  
Old 05-18-2009, 08:24 AM
razrsharpe razrsharpe is offline
Sage Icon
 
Join Date: Sep 2008
Location: Boston, MA
Posts: 2,111
to accomplish what you want i would look at ultramon (http://www.realtimesoft.com/ultramon/). You can set up display profiles to switch which monitor is the primary and then have keyboard shortcuts apply those profiles. Not sure if you can have a certain profile applied when starting a program, but its worth a shot. IR commands are basically keyboard shortcuts so you can try mapping the keyboard shortcut for you profile to the one for full screen toggle... not sure if this would work but again its worth a try.
__________________
Server 2003 r2 32bit, SageTV9 (finally!)
2x Dual HDHR (OTA), 1x HD-PVR (Comcast), 1x HDHR-3CC via SageDCT (Comcast)
2x HD300, 1x SageClient (Win10 Test/Development)
Check out TVExplorer
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
Newbie Studio/programming questions. jaminben SageTV Studio 88 05-02-2009 10:02 AM
No tuning @ the first attempt cmf SageTV Software 2 02-23-2008 04:09 AM
Silly Newbie Question: Starting Studio willetin SageTV Studio 2 01-05-2008 08:21 AM
Studio Newbie Question mightyt SageTV Studio 4 01-30-2006 01:52 AM
D'OH! STV install attempt FRAGGED SAGE!!! lonndoggie SageTV Customizations 6 01-24-2005 10:41 AM


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


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