Page 1 of 1

Problem with scripting

Posted: 23 Oct 2016 16:49
by Ankit Bindal
I was trying to make an time arc based upon time of song.
As soon as time reduces, the arc should also reduce.
But as soon as song starts, the arc becomes 0.
Where am i doing mistake?

http://automagic4android.com/flow.php?i ... 4bf3196fd0

Re: Problem with scripting

Posted: 25 Oct 2016 13:32
by Martin
The script is using integer-arithmetic in the divsion to calcualte vsa since all numbers are integers. Ensure that one of the numbers is a floating point number, for example like this:

ang = media_duration/10000.;// note the dot to force conversion to a floating point number.

You could also make the conversion in the division that causes the problem.
Instead of:
vsa ="{(angfinal/ang)*360,numberformat,0.0}";
write:
vsa ="{(angfinal*360./ang),numberformat,0.0}";

Regards,
Martin

Re: Problem with scripting

Posted: 03 Nov 2016 12:06
by Ankit Bindal
Hi,
I am stuck and I cannot understand anything.
Could anyone help me in making my flow..
http://automagic4android.com/flow.php?i ... 2cb236b0c4

Re: Problem with scripting

Posted: 05 Nov 2016 12:45
by Martin
Hi,

Where are you stuck at? You should untick option Wait for sound to finish. Other than that, your flow seems to work on my device.

Regards,
Martin

Re: Problem with scripting

Posted: 06 Nov 2016 02:39
by Ankit Bindal
Hi,
Thanx, I got the problem