2017-08-14, 10:36
I have a strange problem with getting the window id in my python script. It's the same bit of code in another module which works flawlessly. But it seems that this one doesn't work.
When I call getCurrentWindowId in this particular module, it always reports 10000. ActivateWindow never works unless I call it from the skin, and even then, the Window Id is still returned as 10000.
Here's a sample from the script:
Both oldWindowId and newWindowId both report to contain "10000". If I activate the Window through a menu item on the skin, that works fine. However getCurrentWindowId always reports 10000.
I also use "oldWindow<>11340" because I noted elsewhere that the Window Id is having 10000 added to them.
Here's a sample
As said, the Window loads perfectly through the menu with
So Im confused as to why
Any thoughts?
Thanks
Simon
When I call getCurrentWindowId in this particular module, it always reports 10000. ActivateWindow never works unless I call it from the skin, and even then, the Window Id is still returned as 10000.
Here's a sample from the script:
Code:
oldWindowId = xbmcgui.getCurrentWindowId()
# oldWindowId here returns 10000
if oldWindowId <> 11340:
# Activate the Window
xbmc.executebuiltin('ActivateWindow(1340)')
newWindowId = xbmcgui.getCurrentWindowId()
# newWindowId is still 10000....
Both oldWindowId and newWindowId both report to contain "10000". If I activate the Window through a menu item on the skin, that works fine. However getCurrentWindowId always reports 10000.
I also use "oldWindow<>11340" because I noted elsewhere that the Window Id is having 10000 added to them.
Here's a sample
Code:
<?xml version="1.0" encoding="UTF-8"?>
<window id="1340">
<onload>RunScript(special://home/scripts/cubeone.script.bluetooth.calls)</onload>
<depth>DepthOSD</depth>
<coordinates>
<left>0</left>
<top>0</top>
</coordinates>
<controls>
<include>CommonBackground</include>
<include>ContentPanelBackgrounds</include>
# Controls Here
<include name="CommonWindowHeader">
<param name="Icon" value="" />
<param name="Label" value="Name" />
</include>
</controls>
</window>
As said, the Window loads perfectly through the menu with
Code:
<onclick>ActivateWindow(1340)</onclick>
So Im confused as to why
- ActivateWindow is not working on the script
- Even with the window 1340 loaded, getCurrentWindowId still returns 10000
Any thoughts?
Thanks
Simon