It is currently May 7th, 2024, 3:21 pm

Using Scale over Autoscale not giving expected value.

Get help with creating, editing & fixing problems with skins
Raynemeetor
Posts: 6
Joined: March 17th, 2012, 5:17 pm

Using Scale over Autoscale not giving expected value.

Post by Raynemeetor »

Hi,
I am in the process of adding HDD free space meters to my skin. I want the value to be in MB. I removed Autoscale and added "Scale=1048576" (1024**2). If I got the right info, that should be the correct value.

With "Autoscale=1" I get 42.8 (which is what Explorer states)
With "Scale=1048576" I get 43877

I cant seem to figure out where I have gone wrong. I am guessing it is something basic, but I just can't put my finger on it.

If anyone has a pointer to send me in the correct direction, that would be appreciated.

Thanks ahead of time.
User avatar
~Faradey~
Posts: 366
Joined: November 12th, 2009, 4:47 pm
Location: Ukraine

Re: Using Scale over Autoscale not giving expected value.

Post by ~Faradey~ »

Raynemeetor wrote:Hi,
I am in the process of adding HDD free space meters to my skin. I want the value to be in MB. I removed Autoscale and added "Scale=1048576" (1024**2). If I got the right info, that should be the correct value.

With "Autoscale=1" I get 42.8 (which is what Explorer states)
With "Scale=1048576" I get 43877

I cant seem to figure out where I have gone wrong. I am guessing it is something basic, but I just can't put my finger on it.

If anyone has a pointer to send me in the correct direction, that would be appreciated.

Thanks ahead of time.
Use this Scale=1073741824 value instead
because by this you will get values in megabytes and AutoScale scales them to gigabytes
Raynemeetor
Posts: 6
Joined: March 17th, 2012, 5:17 pm

Re: Using Scale over Autoscale not giving expected value.

Post by Raynemeetor »

~Faradey~ wrote:Use this Scale=1073741824 value instead
because by this you will get values in megabytes and AutoScale scales them to gigabytes
Yes, I had tried that, it did return the correct value (in gigabytes).

On a better note, thanks ~Faradey~.

You let me know I was on the right track, so I rechecked the math behind it (for the 8th or so time) and then it hit me, 1 gigabyte = 1024 megabytes not 1000 megabytes.
I was looking at 42.8GB and was expecting 42825MB (+-25), not 43877MB
Like I said, something basic. :oops:

/me gone to get Dunce Cap