|
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. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
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. |
#2
|
||||
|
||||
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 |
#3
|
|||
|
|||
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> |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|