gameshow Posted July 1, 2005 Share Posted July 1, 2005 I would like to put some integers in a message box, from variables. The integers will never be greater than 2 digits, but if they are a single digit number, i'd like to display the leading 0. Is this possible? Link to comment Share on other sites More sharing options...
FuryCell Posted July 1, 2005 Share Posted July 1, 2005 (edited) I would like to put some integers in a message box, from variables. The integers will never be greater than 2 digits, but if they are a single digit number, i'd like to display the leading 0. Is this possible?<{POST_SNAPBACK}>You could use this:http://www.autoitscript.com/forum/index.php?showtopic=12979Note: You could also use StringFormat but i think the func I made is easier to use.Edit:Just saw GaFrosts Post. It seems StringFormat isn't so hard to use after all. :"> Edited July 1, 2005 by SolidSnake HKTunes:Softpedia | GoogleCodeLyricToy:Softpedia | GoogleCodeRCTunes:Softpedia | GoogleCodeMichtaToolsProgrammer n. - An ingenious device that turns caffeine into code. Link to comment Share on other sites More sharing options...
GaryFrost Posted July 1, 2005 Share Posted July 1, 2005 $int = 5 $s =StringFormat ( "%.2d" , $int ) msgbox(0, "Result", $s) SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. 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