Sign in to follow this  
Followers 0
pumaz77

Convert octets to ko/mo?

6 posts in this topic

Hello, how to convert for example , 1366 = 1,3ko , etc with mo/go?

thx :D

Share this post


Link to post
Share on other sites



What exactly is ko, mo, and go?


For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com

Share this post


Link to post
Share on other sites

I found a way :$

&round($size/1024/1024,2)

etc :$

ty anyway

Share this post


Link to post
Share on other sites

Local $value = 1234567890

ConsoleWrite(StringFormat("%u is %0.02fKb or %0.02fMb or %0.02fGb", $value, $value / 1024, $value / 1048576, $value / 1073741824) & @lf)
ConsoleWrite(StringFormat("%u vaut %0.02fKo ou %0.02fMo ou %0.02fGo", $value, $value / 1024, $value / 1048576, $value / 1073741824) & @lf)


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites

Local $value = 1234567890

ConsoleWrite(StringFormat("%u is %0.02fKb or %0.02fMb or %0.02fGb", $value, $value / 1024, $value / 1048576, $value / 1073741824) & @lf)
ConsoleWrite(StringFormat("%u vaut %0.02fKo ou %0.02fMo ou %0.02fGo", $value, $value / 1024, $value / 1048576, $value / 1073741824) & @lf)

Awesome, Ill use it, thanks!!

Share this post


Link to post
Share on other sites

You may to use Round() as well, depending on your needs. If it's for storage and later use, then assignment with Round() is best but if it's for instant display'n forget, StringFormat can be more flexible and doesn't need extra variable(s).


This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.
Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe here
RegExp tutorial: enough to get started
PCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta.

SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.
SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.
An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.
SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)
A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!
SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0