Problem with scripting

Post your questions and help other users.

Moderator: Martin

Post Reply
Ankit Bindal
Posts: 90
Joined: 12 Feb 2016 03:23

Problem with scripting

Post by Ankit Bindal » 23 Oct 2016 16:49

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

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Problem with scripting

Post by Martin » 25 Oct 2016 13:32

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

Ankit Bindal
Posts: 90
Joined: 12 Feb 2016 03:23

Re: Problem with scripting

Post by Ankit Bindal » 03 Nov 2016 12:06

Hi,
I am stuck and I cannot understand anything.
Could anyone help me in making my flow..
http://automagic4android.com/flow.php?i ... 2cb236b0c4

User avatar
Martin
Posts: 4468
Joined: 09 Nov 2012 14:23

Re: Problem with scripting

Post by Martin » 05 Nov 2016 12:45

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

Ankit Bindal
Posts: 90
Joined: 12 Feb 2016 03:23

Re: Problem with scripting

Post by Ankit Bindal » 06 Nov 2016 02:39

Hi,
Thanx, I got the problem

Post Reply