locodog wrote :
param_equal `get_var a` `get_var a & param_cast 'text' 1` ? SIZE OF 1 :
param_equal `get_var a` `get_var a & param_cast 'text' 2` ? SIZE OF 2 :
param_equal `get_var a` `get_var a & param_cast 'text' 3` ? SIZE OF 3 :
param_equal `get_var a` `get_var a & param_cast 'text' 4` ? SIZE OF 4 :
Thank you !
发表时间 Thu 17 Nov 22 @ 1:18 pm
Someone asked for a midnight countdown video effect, but I was thinking that it would maybe be simpler to add it to a video skin
But that will need some scripting
I assume the value could then be taken from comparing 23:59:59 to get_clock cast to maybe an integer, then param_multiply -1 and param_add to get the difference, maybe adding the missing second, and then showing the value?
But I can only figure out how to do the first few steps...
But that will need some scripting
I assume the value could then be taken from comparing 23:59:59 to get_clock cast to maybe an integer, then param_multiply -1 and param_add to get the difference, maybe adding the missing second, and then showing the value?
But I can only figure out how to do the first few steps...
发表时间 Sun 04 Dec 22 @ 6:10 am
I've done it, I just need to remember how I did it.
*edit, I found it and I remember the problem now. It needs to be started at a known time.
[it monitors saved clock state v current clock and if different, -1 from the countdown, some maths, and resave new clock state]
Problem root is, get_clock, it returns a string so it will only cast the hour value as an int [the : breaks it]. And we've got nothing for casting substrings.
get_clock 'hour'
get_clock 'min'
get_clock 'sec'
would be one fix, for this specific problem, but that isn't real script currently.
param_cast 'text' SIZE INDEX
would be another more round about fix, it would have other uses too, but again doesn't exist.
I suppose it could be brute forced to get the time in a usable form but that would be pretty ugly.
[I'll see how it looks]
Or windows I could make a plugin
发表时间 Sun 04 Dec 22 @ 6:24 am