description:
-the script has to start on turning on the xbox
-the script has to start playing a movie on a defined time (ex 12:00)
-the script has to loop until a defined time
-another script has to shut down the xbox
is this possible or should i forget it?
!need help! timer-started playing!
hiqweever
Junior Member Posts: 15 Joined: Mar 2005 Reputation: 0 |
|
| find quote |
Asteron
"Skilled" Python Coder Joined: Feb 2004 Reputation: 0 |
2005-03-19 00:46
Post: #2
(hiqweever @ mar. 18 2005,10:16 Wrote:description:1. call the script autoexec.py (i believe) 2-3. yeah have a while 1 loop and have it sleep for a few seconds in the polling... check out the yac script for an example of something like this 4. yeah xbmc.shutdown() everything you said is doable and pretty easy. Add yourself to the xbmc forums frappr map! Collection of XBMC and Python resources - Screensaver Megapack |
| find quote |
hiqweever
Junior Member Posts: 15 Joined: Mar 2005 Reputation: 0 |
thx!
the startup thing is ready! also the loop and the shut down! the only thing now i need is to define a time on which the video began to play! is this possible? which string i need? (sorry for my bad english! german!
|
| find quote |
Asteron
"Skilled" Python Coder Joined: Feb 2004 Reputation: 0 |
2005-03-24 16:45
Post: #4
heres the standard python time module
http://www.python.org/doc/2.3/lib/module-time.html im not totally sure xbmc supports it but it probably does. you need to "import time" you can either calculate the number of seconds from now until "12:00" and sleep for that time followed by a player.play("f:\movie.avi") or you can poll the time in your loop and play the movie when you reach the time. theres a calendar script out there somewhere that you should look at as it probably makes use of the time module. Add yourself to the xbmc forums frappr map! Collection of XBMC and Python resources - Screensaver Megapack |
| find quote |
solexalex
Skilled Python Coder Posts: 706 Joined: Jul 2004 Reputation: 6 |
2005-03-24 19:24
Post: #5
you can have a look in the thread module
it is supported with xbmc. or you can do something like this : while 1: if timenow==starttime: playmovie time.sleep(1) but your script will use python 'all the time' i really think that thread is the best way. here is an example that should be interesting : wakeup !.rar |
| find quote |
hiqweever
Junior Member Posts: 15 Joined: Mar 2005 Reputation: 0 |
thats it! but i need this wakeup without the dialogs! only to set the wakeup time in the script! also i need to play a playlist file. and finally i need to set more wakeup times, to play different playlists on different time! is this possible?
i tried to modify your wakeup script but it will not work! can you help me writing such a script? |
| find quote |

![[Image: asterwaverv9.png]](http://img504.imageshack.us/img504/6545/asterwaverv9.png)
Search
Help