|
|
batch file (save as gettime.bat):
echo " > c:\gottime.txt
echo | more | time | find "Current" >> c:\gottime.txt
echo "; >> c:\gottime.txt
pov script:
// Persistence of Vision Ray Tracer Scene Description File
// File: gettime.pov
// Vers: 3.1
// Desc: Use to get system time after gettime.bat file is run.
// Date: 99.66
// Auth: Bob Hughes mailto:inv### [at] aolcom?Subject=PoV-Scene
// Note: Run the batch file gettime.bat before rendering this script
to see system time.
// Could be used to operate parameters based on the system time
for example by using
// the HourTime and MinuteTime values.
#fopen MyFile "c:\gottime.txt" read
#read (MyFile,MyTime)
#fclose MyFile
#declare HourTime = val(substr(MyTime,20,2))
#declare MinuteTime = val(substr(MyTime,23,2))
#declare DayTime = substr(MyTime,31,1)
#declare Time =
concat("Time is ", str(HourTime,2,0) ," Hours and ",
str(MinuteTime,2,0), " Minutes ", DayTime,"m")
text{ttf "timrom.ttf",Time,0.05,0 scale <.75,1.25,1> translate -y/2
pigment {rgb 1}
finish {ambient 1}
translate -5.75*x
}
camera
{
location <0,0,-9>
look_at <0,0,0>
}
There may be a problem with double digit hours since I only tested
with current time of 5 something o'clock. I will see. No, it is okay
for double digits too ;)
The rest is up to you as to how it is used.
--
omniVERSE
Post a reply to this message
|
|