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 04-09-2009, 12:54 PM
teststrips teststrips is offline
Sage User
 
Join Date: Apr 2009
Location: PA, USA
Posts: 43
SageTV opening in the background (out of focus)

If I have other windows open on my machine (say my web browser) and open Sage it opens full screen in the background, and "focus" is still on my browser window.

This isn't a problem when I'm sitting directly at my machine - i can grab the mouse or alt + tab, but this is a problem when I'm on my remote control from my couch (where I don't have a full keyboard/mouse)

Is there a way to force sage to come up being the "in focus" window, and not behind other programs?
Reply With Quote
  #2  
Old 04-09-2009, 01:17 PM
Clift Clift is offline
Sage Expert
 
Join Date: Aug 2008
Location: North Carolina
Posts: 555
What remote do you use?

Andy's (www.babgvant.com) sageTvtray/SageTVLauncher program sets focus on SageTV when the green button is pressed (MCE remote)
__________________
Server:W7 Ultimate, SageTV 7.1.9
Capture Devices: HVR-2250, 2x HD PVR 1212
Clients:
1x STX-HD100
3x STP-HD200
@cliftpompee
Reply With Quote
  #3  
Old 04-09-2009, 05:36 PM
Striker:WG Striker:WG is offline
Sage Aficionado
 
Join Date: Oct 2008
Posts: 472
LMRemoteKeymap also works pretty well allowing you to script different functionality to different buttons depending what has focus, and it can also handle your IR blasting.

-Striker-
Reply With Quote
  #4  
Old 04-10-2009, 08:58 AM
teststrips teststrips is offline
Sage User
 
Join Date: Apr 2009
Location: PA, USA
Posts: 43
Quote:
Originally Posted by Clift View Post
What remote do you use?
I use a Harmony remote, talking to a MCE remote IR box and am using IR Server Suite to grab that input. IR server suite was was written by one of the MediaPortal developers - http://forum.team-mediaportal.com/ir..._4-t33512.html

IR Server Suite sits + listens for IR coming to the MCE IR box... it genearlly just passes on the default keystrokes, but you can remap any IR command to do a diffferent (non-default) keystroke, or to run an executable (I use a lot of batch files).

I set up a soft key on my harmony remote to say "lights" - this button calls a batch file, which is set to cycle through three different light "modes". Full lighting, movie lighting, and OFF. In reality, my batch is sending commands to my USB based X10 RF module (CM19A- cheap on ebay).

I have a similar soft key called "monitor" - this cycles monitor profiles, switching from my 22 inch desktop monitor, to my Projector.

And finally, I have a soft key called "SageTV" - this pretty much just launches SageTV.

I guess I can create another soft key for Alt+Tab.

For those interested in the actual Batch logic that I"m using, its documented here: http://forum.team-mediaportal.com/mc...-things-39970/

I guess my biggest issue though is why Sage opens in the background - no matter how I launch Sage, it never takes "focus" - is this normal, or is my machine acting "funny" for some reason.
Reply With Quote
  #5  
Old 04-10-2009, 09:21 AM
teststrips teststrips is offline
Sage User
 
Join Date: Apr 2009
Location: PA, USA
Posts: 43
I just read a bit more about the two suggested programs above. Looks like SageTVLauncher may be my answer - as long as it doesn't "mess" with my other software (IR Server Suite).

If that fails, I may try to see if I get any different results with LM Remote keyMap
Reply With Quote
  #6  
Old 04-10-2009, 08:52 PM
teststrips teststrips is offline
Sage User
 
Join Date: Apr 2009
Location: PA, USA
Posts: 43
sagetvlauncher did not work for me - whatever hijack my other program (ir server suite) uses to listen to the IR box, seems to block out sagetvlauncher from hearing the commands.

I did, however find a program called sendfocus.exe which I was able to incorporate into my .bat script files. I found several places talking about the sendfocus.exe program, but had trouble actually finding it... I eventually found a working link in this thread http://www.promixis.com/forums/showthread.php?t=10498

One problem I had working on this was if sage was closed, the batch file wouldn't wait long enough for the window "sagetv" to open + I'd get an error from sendfocus.exe... my final working script is below:

Code:
c:
cd \batch
sagetvshortcut.lnk
PING 1.1.1.1 -n 1 -w 3000 >NUL
sendfocus.exe sagetv
You may also note that I called a shortcut to sagetv, rather than going for c:\program files\sagetv\sagetv\sagetv.exe.... this is because if a batch file calls an .exe it generally waits for that .exe to "finish" or "close" before moving to the next command. If you use a shortcut file (which will always end in a .lnk extension), the batch file will continue to progress without waiting first.
Reply With Quote
  #7  
Old 04-11-2009, 03:04 PM
Striker:WG Striker:WG is offline
Sage Aficionado
 
Join Date: Oct 2008
Posts: 472
Quote:
Originally Posted by teststrips View Post
sagetvlauncher did not work for me - whatever hijack my other program (ir server suite) uses to listen to the IR box, seems to block out sagetvlauncher from hearing the commands.

I did, however find a program called sendfocus.exe which I was able to incorporate into my .bat script files. I found several places talking about the sendfocus.exe program, but had trouble actually finding it... I eventually found a working link in this thread http://www.promixis.com/forums/showthread.php?t=10498

One problem I had working on this was if sage was closed, the batch file wouldn't wait long enough for the window "sagetv" to open + I'd get an error from sendfocus.exe... my final working script is below:

Code:
c:
cd \batch
sagetvshortcut.lnk
PING 1.1.1.1 -n 1 -w 3000 >NUL
sendfocus.exe sagetv
You may also note that I called a shortcut to sagetv, rather than going for c:\program files\sagetv\sagetv\sagetv.exe.... this is because if a batch file calls an .exe it generally waits for that .exe to "finish" or "close" before moving to the next command. If you use a shortcut file (which will always end in a .lnk extension), the batch file will continue to progress without waiting first.
instead of calling a shortcut, you could also use the START command.

this will allow the batch file to start another process and continue processing the batch file without waiting for the program you called to respond or exit.

-Striker-
Reply With Quote
  #8  
Old 04-13-2009, 08:36 AM
teststrips teststrips is offline
Sage User
 
Join Date: Apr 2009
Location: PA, USA
Posts: 43
Quote:
Originally Posted by Striker:WG View Post
instead of calling a shortcut, you could also use the START command.
Awesome - I'll keep that in mind. I use batch files for a lot of things... I should probably learn some other scripting language, but I've always been able to do what I want done with a simple .bat.

Does anyone have any suggestions on another (easy to learn) language or scripting tool to play with?
Reply With Quote
  #9  
Old 04-13-2009, 12:09 PM
babgvant babgvant is offline
Sage Icon
 
Join Date: Jul 2008
Location: London
Posts: 1,834
Quote:
Originally Posted by teststrips View Post

I guess my biggest issue though is why Sage opens in the background - no matter how I launch Sage, it never takes "focus" - is this normal, or is my machine acting "funny" for some reason.
that's an issue with how windows assigns focus. it doesn't see the relationship b/w your launcher and this new application that pops up and wants to "steal" focus.
__________________
babgvant.com | @babgvant | Missing Remote
Reply With Quote
  #10  
Old 04-13-2009, 12:11 PM
babgvant babgvant is offline
Sage Icon
 
Join Date: Jul 2008
Location: London
Posts: 1,834
Quote:
Originally Posted by babgvant View Post
that's an issue with how windows assigns focus. it doesn't see the relationship b/w your launcher and this new application that pops up and wants to "steal" focus.
the newest rev of sagetvlauncher forgos all the fancy API stuff and just simulates a mouse click in the middle of the screen.
__________________
babgvant.com | @babgvant | Missing Remote
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
SageTV/Event Ghost - SageTV Loses Focus jsonnabend SageTV Software 0 05-30-2008 12:20 PM
SageTV loses focus OferL SageTV Software 2 08-31-2006 12:14 PM
SageTV 4.0 service - opening Sage UI hangs running SageTV client Surtr SageTV Software 1 11-10-2005 01:25 PM
Anyone have No Focus Girder Configuration for Sagetv? RobDMB Hardware Support 13 12-01-2004 03:29 PM
Multiple SageTV Clients opening? Muchacho SageTV Beta Test Software 14 04-22-2004 05:47 PM


All times are GMT -6. The time now is 11:16 PM.


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