Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Math help calculate percentage

$
0
0
Hello,

As the tittle says i need some math help to calculate percentage.
This is my script
[ autoit ]      
#include <GUIConstantsEx.au3> $s = 58985480 $ts = Round($s / 1000) $ds = 57603 $i = 0 Do     $sec = @SEC     $bs = 1500     While @SEC = $sec     WEnd     $cs = $ds  $ts = Round($ts - (($cs - $bs) /100))  $ps = Round($ts / $s * 100000)     ConsoleWrite($ts & @CRLF & $ps &"%" & @CRLF) Until $i = 100
$ps is the percentage. What the script does is: It has a specific number and every sec that number gets lowered.
I have managed getting it percentage and count it but my problem is that is the wrong way.
It has to rise from 0% to 100%. Now it is the oposite. It is 100% and as the number gets lowered it gets too.

Any kind of help appretiated

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>