is it possible do open the drive-tray with an phyton command. my dvd-drivbe has a bug and so i want to close its tray after startup xbmc autmatically.
greetings
tetzlav
Drive eject/load over python command
tetzlav
Junior Member Posts: 7 Joined: Aug 2005 Reputation: 0 |
2005-09-18 02:19
Post: #1
|
| find quote |
solexalex
Skilled Python Coder Posts: 706 Joined: Jul 2004 Reputation: 6 |
2005-09-18 11:34
Post: #2
try this.
not tested ... so just tell me what it does : -wait 2 seconds to be sure... just in case -test if cd tray is open - if so, launch a command to close it the test is important as it is the same command to open or close the tray hope it works for you ! just copy the code below and past it inside a simple text file ; name it as you want .py (i.e autoclosecdtray.py) ; upload it in your xbmc script folder if you want to launch it automatically at startup, name it autorun.py (or autoexec.py don't remember ) and place it exactly in your q:\script directoryQuote:import xbmc |
| find quote |
tetzlav
Junior Member Posts: 7 Joined: Aug 2005 Reputation: 0 |
2005-09-18 14:51
Post: #3
thank you for the answer, but the xbmc.executebuiltin(xbmc.ejecttray())-command doesnt work for me.
i've tried this too (without sleep and tray-open-check) Quote:#! pythonbut this does nothing too. the pythonscripts had do be in cr or lf character set? the eject/load-button in shutdown-submenu works fine. further ideas!? ***edit*** i found the fault: you have to encase the executebuiltin in two ' (apostrophe) like that Quote:#!pythonnow the script works fine! thanks! ***/edit*** greetings tetzlav |
| find quote |
solexalex
Skilled Python Coder Posts: 706 Joined: Jul 2004 Reputation: 6 |
2005-09-18 23:55
Post: #4
ok
sorry for this missing ! did you try my first script with single quotes ? does it work ? |
| find quote |

) and place it exactly in your q:\script directory
Search
Help