System.CurrentWindow = system = id?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Hitcher Offline
Skilled Skinner
Posts: 9,915
Joined: Aug 2007
Reputation: 67
Location: Eastleigh, UK
Question  System.CurrentWindow = system = id? Post: #1
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.

[Image: sig_zps3af3b48e.jpg]
find quote
Jezz_X Offline
Team-XBMC Skinner
Posts: 5,263
Joined: Jun 2006
Reputation: 55
Location: Earth
Post: #2
I'm kind of confused here but for a program add-on Window.IsVisible(XML FileName) should work fine

Skins I have done....
[Image: skinsq.png]
And others in the past...

Want to know what I'm working on currently? Check me out on Google+
find quote
Hitcher Offline
Skilled Skinner
Posts: 9,915
Joined: Aug 2007
Reputation: 67
Location: Eastleigh, UK
Post: #3
Yeah but I don't want to have to do that for every addon. Wink

[Image: sig_zps3af3b48e.jpg]
find quote
Jezz_X Offline
Team-XBMC Skinner
Posts: 5,263
Joined: Jun 2006
Reputation: 55
Location: Earth
Post: #4
oh I don't think you can just do a general check for every add-on you run to match

Skins I have done....
[Image: skinsq.png]
And others in the past...

Want to know what I'm working on currently? Check me out on Google+
find quote
pecinko Offline
Donor
Posts: 2,995
Joined: Dec 2008
Reputation: 26
Location: Prague / Belgrade
Post: #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:

Quartz
Amber
find quote
Hitcher Offline
Skilled Skinner
Posts: 9,915
Joined: Aug 2007
Reputation: 67
Location: Eastleigh, UK
Post: #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.

[Image: sig_zps3af3b48e.jpg]
find quote
Jezz_X Offline
Team-XBMC Skinner
Posts: 5,263
Joined: Jun 2006
Reputation: 55
Location: Earth
Post: #7
by pure accident I'm sure Smile

Skins I have done....
[Image: skinsq.png]
And others in the past...

Want to know what I'm working on currently? Check me out on Google+
find quote
Hitcher Offline
Skilled Skinner
Posts: 9,915
Joined: Aug 2007
Reputation: 67
Location: Eastleigh, UK
Post: #8
Oh yes, but it must mean something surely?

[Image: sig_zps3af3b48e.jpg]
find quote
pieh Offline
Team-XBMC Member
Posts: 655
Joined: Aug 2010
Reputation: 13
Location: Poland
Post: #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
find quote
Hitcher Offline
Skilled Skinner
Posts: 9,915
Joined: Aug 2007
Reputation: 67
Location: Eastleigh, UK
Post: #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.

[Image: sig_zps3af3b48e.jpg]
(This post was last modified: 2012-05-29 21:55 by Hitcher.)
find quote