Posts: 3,909
Joined: Dec 2004
Reputation:
20
Nuka1195
Skilled Python Coder
Posts: 3,909
there is no setenabled(true/false) method available like there is for setvisible(). but if you can compile your own xbmc all the needed functions already exist.
in xbmc\lib\libpython\xbmcmodule\control.cpp copy the setvisible method and change it to setenabled, make sure you copy all instances of setvisible.
if a developer agrees, i can add this in and submit a patch. if the code is right, it seems like a good capability.
Posts: 65
Joined: May 2006
Reputation:
0
sorry, dont have all the necessaary stuff, and i wouldnt like to make a script that requires the latest bleeding edge version.
but i agree with you that this should be patched into the base functionality of xbmc scripting.
thanks for your answer!
Posts: 65
Joined: May 2006
Reputation:
0
great! that is good news, so thanks alot!
but im also a little concerned about older users, so is there any way to request the current xbmc version that the script is running on? ive looked at the python api, but couldnt find anything except , but that is for the api right?
Posts: 363
Joined: Jun 2004
Reputation:
0
yes you can. thanks to nuka again. he recently added api that you can use to get the builddate. and the builddate is most likely the same date the source was downloaded.
try:
xbmc.getinfolabel("system.builddate")
except:
print "no infolabel,that means that this is most likely pre 29-05-2006"
# - 29-05-2006 changed: updated xbmc.getinfolabel and xbmc.getinfoimage to take in string arguments, thanks to nuka1195.
# - 28-05-2006 added: [ 1496246 ] xbmc.getinfolabel(int) & xbmc.getinfoimage(int) to python, thanks to nuka1195.
Posts: 65
Joined: May 2006
Reputation:
0
nice! perhaps a version would be fine also?
btw, could you update your python documentation with labels that can be used, and perhaps other constants that is used in every other script (action_move_left = 1) etc?
or is this info available in the xbmc manual? i know i tried to find the consts for the actions in the manual, but had a really hard time to find it.
Posts: 3,909
Joined: Dec 2004
Reputation:
20
Nuka1195
Skilled Python Coder
Posts: 3,909
ot: thor, would you want to take a look at what i've done so far with the documentation and see if you have any suggestions that would make it better? i could send the html files or the source files that i've changed?
Posts: 497
Joined: Aug 2004
Reputation:
0
no theres not at the mo, i did post in this forum a few days back with some coding i done to make it work(which was wrong but could be easily implimented, however for my solution i found python too slow(a cursor) so i just made the dpad jump to my buttons instead.
read the xbmc online-manual, faq and search the forums before posting! do not e-mail the xbmc-team asking for support!
read/follow the forum rules! note! team-xbmc never have and never will host or distribute ms-xdk binaries/executables!