teris1994 Posted February 4, 2014 Share Posted February 4, 2014 Hello guys , i have create a script for my program for get filesize . I get the size and all is right . But the sum for size folder , in label prin like that 3.32423423482304 MB I want see like that : 3.32 MB The variable in a function global $size= ($image_size + $libs_size + $logs_size + $tools_size) if $size > 1048576 Then $size_a = " MB" $size = $size/1048576 ElseIf $size< 1048576 Then $size_a = " bytes" EndIf local $label_info_size = GUICtrlCreateLabel("The size is:" & $size & $size_a & "." ,100 , 380) Some parts from my code , to neeed... If you want all code tell me please Link to comment Share on other sites More sharing options...
Solution JohnOne Posted February 4, 2014 Solution Share Posted February 4, 2014 local $label_info_size = GUICtrlCreateLabel("The size is:" & Round($size,2) & $size_a & "." ,100 , 380) AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
teris1994 Posted February 4, 2014 Author Share Posted February 4, 2014 thank you very much is work fine , and i undrstand the code if Round($size,2) 3.23 MB like that. if Round($size,3) 3.233 MB Thank you close the topic , as answer... Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted February 4, 2014 Moderators Share Posted February 4, 2014 teris1994, you can mark your own topic as answered. Just highlight JohnOne's post as the correct answer, and amend the topic title in your initial post with (Resolved) "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now