wiseant
6th July 2012, 06:19
Hi
I can't seem to get writefile() to work for me, probably because I am using it inside a for loop in GScript.
chapters=12
inc=frames/(chapters)
for i=0 to chapters-1
t=Eval(String(inc*i))
I then do my convert frame to time
t0=(t/24)
# for 23.976:
tms = (t*1001)/24
t1=(t0/(60*60))
s1=String(t1)+":"
if (t1 < 10) {
s1 = "0"+s1
}
t2=(t0%(60*60)/60)
s2=String(t2) +":"
if (t2 < 10) {
s2 = "0"+s2
}
t3=(t0%60)
s3=String(t3)
t4 = tms - (t1*1000*60*60) - (t2*60*1000) - (t3*1000)
if (t4 > 499) {
t3=t3+1
s3=String(t3)
}
if (t3 < 10) {
s3 = "0"+s3
}
s5=s1+s2+s3
and end up with string s5
I then tried to writefile(filename, "s5")
and all I got was the same value, the last value, 12 times instead of all 12 values?
I tried writefile(filename, "i")
and got the same result
Any ideas?
TIA
I can't seem to get writefile() to work for me, probably because I am using it inside a for loop in GScript.
chapters=12
inc=frames/(chapters)
for i=0 to chapters-1
t=Eval(String(inc*i))
I then do my convert frame to time
t0=(t/24)
# for 23.976:
tms = (t*1001)/24
t1=(t0/(60*60))
s1=String(t1)+":"
if (t1 < 10) {
s1 = "0"+s1
}
t2=(t0%(60*60)/60)
s2=String(t2) +":"
if (t2 < 10) {
s2 = "0"+s2
}
t3=(t0%60)
s3=String(t3)
t4 = tms - (t1*1000*60*60) - (t2*60*1000) - (t3*1000)
if (t4 > 499) {
t3=t3+1
s3=String(t3)
}
if (t3 < 10) {
s3 = "0"+s3
}
s5=s1+s2+s3
and end up with string s5
I then tried to writefile(filename, "s5")
and all I got was the same value, the last value, 12 times instead of all 12 values?
I tried writefile(filename, "i")
and got the same result
Any ideas?
TIA