System.CurrentWindow = system = id?
#1
Question 
While trying to find a way to hide a global custom overlay when a program addon is run I discovered that System.CurrentWindow returns system as the window but there's no mention of it in the wiki so I don't know it's name or id to use in a visible condition, instead I'm having to use this stringcompare - !StringCompare(System.CurrentWindow,system).

Anyone know if it actually has a name or ID I can use in Window.IsVisible()?

Thanks.
Reply
#2
I'm kind of confused here but for a program add-on Window.IsVisible(XML FileName) should work fine
Reply
#3
Yeah but I don't want to have to do that for every addon. Wink
Reply
#4
oh I don't think you can just do a general check for every add-on you run to match
Reply
#5
Here's how I use it:

PHP Code:
<window type="dialog" id="50">
  <
zorder>3</zorder>
  <
coordinates>
    <
posx>0</posx>
    <
posy>0</posy>
  </
coordinates>
  <
visible>!Window.IsVisible(startup) + [Skin.HasSetting(DebugInfo) | Skin.HasSetting(DebugGrid)]</visible>
  <
controls
My skins:

Amber
Quartz

Reply
#6
(2012-05-28, 08:49)Jezz_X Wrote: oh I don't think you can just do a general check for every add-on you run to match

I found that System.CurrentWindow returns system as the current window when running program addons which is when I want to hide my custom overlay.
Reply
#7
by pure accident I'm sure Smile
Reply
#8
Oh yes, but it must mean something surely?
Reply
#9
Python windows automaticly assign their ids from 13000 up to 13010. If you would look into strings.xml / strings.po You would see that 13000 string is "System" (that's the reason for current behavior). You could propably use !Window.IsVisible(13000) up to 13010 to determine if there is active python window.
Always read the XBMC online-manual, FAQ and search the forums before posting.
Do NOT e-mail Team-XBMC members asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting, make sure you read this first

My previous forum/trac nickname: grajen3
Reply
#10
(2012-05-29, 09:29)pieh Wrote: Python windows automaticly assign their ids from 13000 up to 13010. If you would look into strings.xml / strings.po You would see that 13000 string is "System" (that's the reason for current behavior). You could propably use !Window.IsVisible(13000) up to 13010 to determine if there is active python window.

Thanks for looking into this for me pieh, it also explains why I've found a few (games) that use 'video only' (string ID 13002) and they wouldn't hide before.

Just to confirm for anyone else who wants to use this !Window.IsVisible(13000) works.
Reply

Logout Mark Read Team Forum Stats Members Help
System.CurrentWindow = system = id?0