Front Row still on top

1 view
Skip to first unread message

Massimiliano Gargani

unread,
Feb 10, 2010, 4:46:32 AM2/10/10
to frontpyth...@googlegroups.com
Hi,

I'm writing a little plugin to watch TV.

I have a sat decoder able to stream the channels. My plugin get the
URL of channel, launch VLC and open the URL. It works.
My problem is FR hide the menu but still the frontmost app, so VLC is
behind it.

I tried to understand how to send it to back (I need to keep it open
when I want to change channel I have to close VLC and back to channel
list) but with no luck.
Any help is appreciated.

Attached the source. Sorry for my code but I'm pretty new of python.

Thanks,
Max

frDream.py

Jon Christopher

unread,
Feb 11, 2010, 1:59:52 PM2/11/10
to frontpyth...@googlegroups.com
I recommend looking at PyeTV in general and PyeTVWaitController.py in
particular:

http://code.google.com/p/pyetv/source/browse/trunk/PyeTVWaitController.py

PyeTV has to solve the same problems.

-Jon

> --
> You received this message because you are subscribed to the Google Groups
> "frontpython-discuss." group.
> To post to this group, send email to frontpyth...@googlegroups.com.
> To unsubscribe from this group, send email to
> frontpython-dis...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/frontpython-discuss?hl=en.
>
>
>

masgar

unread,
Feb 11, 2010, 3:11:14 PM2/11/10
to frontpython-discuss.
Thanks,

waiting to be admitted to the list, I found the solution with:

class LaunchMe(PyFR.WaitController.WaitController):
def HideIT(self):
frController = BRAppManager.sharedApplication().delegate()
self.fireMethod( frController, "_continueDestroyScene:",
None )
return

Now I'm facing another problem. After FR disappears, VLC is behind
Finder. I have to find how to bring on top even if VLC settins are
always on top and fullscreen.

Max


On 11 Feb, 19:59, Jon Christopher <jon.christop...@gmail.com> wrote:
> I recommend looking at PyeTV in general and PyeTVWaitController.py in
> particular:
>

>  http://code.google.com/p/pyetv/source/browse/trunk/PyeTVWaitControlle...

Jon Christopher

unread,
Feb 11, 2010, 3:49:51 PM2/11/10
to frontpyth...@googlegroups.com
The answer is the moral equivalent of


tell app "VLC"
activate
end tell

or perhaps tell raise.

masgar

unread,
Feb 19, 2010, 6:18:54 AM2/19/10
to frontpython-discuss.
When I select a channel I call this:

def azione(self, menu, menuItem):
LaunchMe.alloc().HideIT()
cmkill = """osascript -e 'tell application "VLC" to quit'"""
zapTo = "tell application \"VLC\" to OpenURL \"http://
192.168.1.32/web/zap?sRef=%s" % menuItem.arg+"\""
streamIt = "tell application \"VLC\" to OpenURL \"http://
192.168.1.32:8001/%s" % menuItem.arg+"\""
cma = """osascript -e '%s'""" % zapTo
cmb = """osascript -e '%s'""" % streamIt
cme = """osascript -e 'tell application "VLC" to activate'"""
cmc = """osascript -e 'tell application "VLC" to play'"""
cmd = """osascript -e 'tell application "VLC" to
fullscreen'"""
def stupidtrick():
log("uccido VLC")
os.system(cmkill)
log("zap to channel")
os.system(cma)
log("load stream")
os.system(cmb)
log("play stream")
os.system(cmc)
os.system(cmd)
log("activate VLC")
os.system(cme)
log("Done!!")
stupidtrick()

but it doesn't work. VLC still the last app behind. I tried also to
set VLC preferences to be always on top
but no luck.

Help is appreciated.

Thanks,
Max

Reply all
Reply to author
Forward
0 new messages