SageTV Community  

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

Notices

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.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-12-2005, 03:05 PM
n3w813 n3w813 is offline
New Member
 
Join Date: May 2005
Posts: 2
FIXED: Adding a pause during close in custom xml menu...

Small focus issue....

I'm currently using the a program called message.exe to return focus to Meedio when exiting SageTV. But one small problem I have is, when I do not stop the playback first when I sleep Meedio, ~80% of the time Meedio does come on screen but focus is not on it (ie. my keyboard/remote doesnt work).

I've even added a 'Stop' command to my menu item, but didnt help. What exactly does the 'waitforexit' attribute do? I've set it to '1' but still does not help my problem. Is there a way to insert a timed pause after the Stop command before executing the Power Off and message.exe commands?

(my custom command in cayars-menu.xml)
<actionMenuItem
title="Switch to Meedio (Close)"
icon="STVs\OriginalV2\cayars\sleep.png">
<actionList>
<sageCommand command="Stop"/>
<sageCommand command="Power Off"/>
<extCommand
window="hidden"
command="D:\Program Files\message\message.exe"
arguments="-C H2-WM-COMMAND -W 45 -L 0"
waitforexit="1"/>
</actionList>
</actionMenuItem>

Thanks!!!

Last edited by n3w813; 05-16-2005 at 01:39 PM.
Reply With Quote
  #2  
Old 05-16-2005, 11:54 AM
nielm's Avatar
nielm nielm is offline
SageTVaholic
 
Join Date: Oct 2003
Location: Belgium
Posts: 4,496
waitforexit means wait for this command to complete before executing the next command in the list... in your case the waitforexit command is the last one, so it has no effect!

I guess what might be happening is that Sage is still putting itself to sleep after the give-medio-focus command executes, so sage steals back the focus...

One option is a program which would simply pause for a few ms, and run this after the PowerOff (with waitforexit=1) and before the focus meedio command so that Sage has a chance to sleep! (make any sense?)

Search Google for a Windows Sleep command, or cheat by using ping:
ping -n 2 localhost
will give a 1-second sleep...
__________________
Check out my enhancements for Sage in the Sage Customisations and Sageplugins Wiki
Reply With Quote
  #3  
Old 05-16-2005, 01:37 PM
n3w813 n3w813 is offline
New Member
 
Join Date: May 2005
Posts: 2
Thanks, Nielm. I figured as much, that Sage was stealing the focus back. So I cheated.....repeating the call multiple times :P

For those who are interested, my workaround is below. Meedio has gotten focus back 100% so far.

<actionMenuItem
title="Switch to Meedio (Close)"
icon="STVs\OriginalV2\cayars\exit.png">
<actionList>
<sageCommand command="Stop"/>
<sageCommand command="Power Off"/>
<extCommand
window="hidden"
command="D:\Program Files\message\message.exe"
arguments="-C H2-WM-COMMAND -W 45 -L 0"
waitforexit="0"/>
<extCommand
window="hidden"
command="D:\Program Files\message\message.exe"
arguments="-C H2-WM-COMMAND -W 45 -L 0"
waitforexit="0"/>
<extCommand
window="hidden"
command="D:\Program Files\message\message.exe"
arguments="-C H2-WM-COMMAND -W 45 -L 0"
waitforexit="0"/>
<extCommand
window="hidden"
command="D:\Program Files\message\message.exe"
arguments="-C H2-WM-COMMAND -W 45 -L 0"
waitforexit="0"/>
<extCommand
window="hidden"
command="D:\Program Files\message\message.exe"
arguments="-C H2-WM-COMMAND -W 45 -L 0"
waitforexit="0"/>
<extCommand
window="hidden"
command="D:\Program Files\message\message.exe"
arguments="-C H2-WM-COMMAND -W 45 -L 0"
waitforexit="0"/>
</actionList>
</actionMenuItem>
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


All times are GMT -6. The time now is 12:35 PM.


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