Hi, I would like to call an external program in the middle of my celestia script:
ret = os.execute("/usr/bin/mplayer -fs /path/intro.mpg")
(I tested also other commands of course)
I always get this error:
Celestia encountered an error while processing your script
Details
[string "/home/alesan/lavori/planetarium/celestia/scripts/t..."]:15: attempt to index global `os' (a nil value)
I tried to set celestia.cfg' ScriptSystemAccessPolicy both to "Ask" and "Allow" without luck.
Any suggestion?
thank you
Alessio Sangalli
Calling external programs: 'os nil value'
What would the complete Windows line be?
shatters crashed before I could get the manual.
how would you play a sound file?
how would you play a sound file?
do you use windows? me not
anyway, in windows I would do:
os.execute("start c:\\path\\file.mp3")
this will start your mp3 player and immediately release the control back to celestia so it can go on displaying 3D animations. Open a DOS console and type "start /?" for more information.
If you're a linux user you can choose many ways, I'd write a small bash script that launches some command line audio player (play, mpg123, etc) in the background.
ciao
Alessio Sangalli
anyway, in windows I would do:
os.execute("start c:\\path\\file.mp3")
this will start your mp3 player and immediately release the control back to celestia so it can go on displaying 3D animations. Open a DOS console and type "start /?" for more information.
If you're a linux user you can choose many ways, I'd write a small bash script that launches some command line audio player (play, mpg123, etc) in the background.
ciao
Alessio Sangalli