GaryFrost Posted September 29, 2005 Posted September 29, 2005 Think what you like, opionions are like ass-holes, eveyone has one. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
ligenza Posted September 29, 2005 Posted September 29, 2005 Think what you like, opionions are like ass-holes, eveyone has one.Everyone has a brain also. I'm just superior. Can't help it.
GaryFrost Posted September 29, 2005 Posted September 29, 2005 You told a joke, good for you. lmao. SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference.
ligenza Posted September 29, 2005 Posted September 29, 2005 You told a joke, good for you. lmao.?? Where!
jefhal Posted September 29, 2005 Posted September 29, 2005 (edited) Here's the one that pads as many zeros in front of a number that you want. I call it "Procrustes". Enjoy! $pad = "0" $procrustes = InputBox("How long?","How long do you want your digits?",2) $a = InputBox("Enter a number:","Enter the number you want to convert","1") for $i = 1 to $procrustes - stringlen($a) $pad = $pad & "0" next $a = StringRight($pad & $a,$procrustes) MsgBox(4096,"",$a) OR, this version has one less line: #include <string.au3> $pad = "0" $procrustes = InputBox("How long?","How long do you want your digits?",2) $a = InputBox("Enter a number:","Enter the number you want to convert","1") $pad = _StringRepeat("0",$procrustes - stringlen($a)) $a = StringRight($pad & $a,$procrustes) MsgBox(4096,"",$a) Edited September 30, 2005 by jefhal ...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format
ligenza Posted September 29, 2005 Posted September 29, 2005 Here's the one that pads as many zeros in front of a number that you want. I call it "Procrustes". Enjoy!$pad = "0" $procrustes = InputBox("How long?","How long do you want your digits?",2) $a = InputBox("Enter a number:","Enter the number you want to convert","1") for $i = 1 to $procrustes - stringlen($a) $pad = $pad & "0" next $a = StringRight($pad & $a,$procrustes) MsgBox(4096,"",$a)I like it.
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