Non-fullscreen script
#1
Hi all,

Is it possible to have a script that is non-fullscreen*, or failing that a transparent background in a script?

I have a script that listens on an IP port that I want to pop up relatively discretely when it receives data - that bit works fine, but my window is fullscreen, which could become a bloody nuisance! ;-)

I'm really struggling to find a way to do it.

EDIT: *Much like the Error pop-up that comes up when you try to run a script and it fails.
Reply
#2
You can call that dialog directly if you wish - see the Notification built in, or alternatively use a dialog class for your window.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
notification builtin is the best way and the simplyest!

if you want more, you can use windowxml dialog, you can see an exemple in use in my sportlive script.
Reply
#4
Hi, Thanks guys.

I did this in the end (I assume this is what you mean by dialog):

Code:
options = ["Front Room", "xxxxx's Room", "xxxxxx's Room", "Our Room"]
    selectDialog = xbmcgui.Dialog()
    selected = selectDialog.select( "Home Control", options )
    selectedItem = options[selected]

Is the windowxml stuff how I would animate windows (like sliding in from the side)?

I've googled and searched a lot, but I can find no examples of how to do this from a xbmc python script.
Reply
#5
no, this dialog is a builtin, it's already define in skin.
if you want your own dialog to animate it, you need to create it.
check how my plugin work, it's not a big deal.
Reply
#6
Hi, I did try the Sports script, but I can't get it to run (I get the "ERROR. Script Failed" message. I am running on Windows here - although at home I will be running on Linux - I struggle to use Windows, so am probably doing something wrong).

I have tried the windowXML framework from the wiki, but I get the same error with that too.
Reply
#7
post your error log, should run.
Reply
#8
I don't even know where it is in the Windows version, and I can't search for it as I'm using Vista and the search won't even find a file that's right under it's own nose.

I might just wait until I get home where I can use Linux again.
Reply
#9
Ahh, ok. If I navigate to the script (SportsLive) using the XBMC filemanager,then I can execute it, but I only get a blank MessageBox with OK and Cancel on. If I click OK then nothing happens. I select the sript again, then I get the choice off adding things. I add one of the Tennis ones, then click OK, then I'm back to the file manager again.

I'm not sure if this is correct behaviour or not, but I can't see any animation/dialog windows.

Looking in the code, I can't see any reference to WindowXML.
Reply
#10
yes, it's correct, have read the first topic a the script to know what it do ?

it will send you a notification or a dialog on screen (see settings) when the score of a selected event change.
soo, you'll have to wait a bit to see a score change (tennis play, should be able to see notification every 4-5 min)
Reply
#11
Ahh - cool.

So when I am notified, the window-dialog will appear?

Brilliant!
Reply
#12
yes, in scripts settings, you can choose what display to use: builtin notification dialog or windowxml dialog (a dialog bar appear on top of the screen - see screenshot)
Reply
#13
Nope, I am truly getting nowhere.

I've even tried the script in this thread: http://forum.xbmc.org/showthread.php?tid=24839

...and I still just get errors.

I wish there were some docs for this, (or at least some sort of feedback when the script doesn't work) then at least I'd have a fighting chance! ;-)

If I could just get a window showing, then I'm pretty sure I could work the rest out.
Reply
#14
to get the notification window, you need the following:


Code:
import xbmc

icon = "path/to/the/icon.png"
line1 = "Text for the header"
line2 = "Text for the body"
xbmc.executebuiltin("XBMC.Notification(%s,%s,1000,%s)" % (line1,line2,icon))

1000 is display time in ms

call that every time you want to notify user of something
Reply
#15
Hi, thanks for that.

I changed your code to include a proper path to the icon etc... but that won't execute either.

I'm starting to think that XBMC/Python on Windows doesn't work - I've hardly had any trouble at all at home (Ubuntu), but I've not managed to get a single script to exeucte without a whole host of trouble all day.
Reply

Logout Mark Read Team Forum Stats Members Help
Non-fullscreen script0