Jump to content
Sign in to follow this  
yucatan

kilobyte to mb

Recommended Posts

yucatan

hi when i run this code

$mem = MemGetStats()

MsgBox(0, "Total physical RAM (KB):", $mem[1])

but i wanne know it in my can i not first calcutale $mem to mb? and then show it ?

Share this post


Link to post
Share on other sites
flip209

hi when i run this code

$mem = MemGetStats()

MsgBox(0, "Total physical RAM (KB):", $mem[1])

but i wanne know it in my can i not first calcutale $mem to mb? and then show it ?

MsgBox(0, "Total physical RAM (MB):", round($mem[1] / 1024,1))

" I haven't failed. I've just found 10,000 ways that won't work." Thomas Edison "You cannot help men permanently by doing for them what they could and should do for themselves." Abraham Lincoln

Share this post


Link to post
Share on other sites
flip209

And

MsgBox(0, "Total physical RAM (GB):", round($mem[1] / 1024 / 1024,1)) ;for GB


" I haven't failed. I've just found 10,000 ways that won't work." Thomas Edison "You cannot help men permanently by doing for them what they could and should do for themselves." Abraham Lincoln

Share this post


Link to post
Share on other sites
yucatan

haha THX alot very simpel command and works nite thx mate

but i have one more problem and i dont know why it dont work i wanne do the same with the $mhz

$mhz = RegRead("HKEY_LOCAL_MACHINE\HARDWARE\DESCRIPTION\System\CentralProcessor\0", "~MHz")

MsgBox(4096, "Test", $mhz )

MsgBox(0, "Total physical RAM (MB):", round($mhz[1] / 1024,1))

when i run this i get a error can u tell me why?

Edited by yucatan

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  

×