ray306 Posted February 18, 2007 Posted February 18, 2007 Hi: Does anyone now how to set up an input box to accept currency as the input. I've set one of the constraints to number which of course precludes the period (ie. $5.00) I can easily do error checking on the data but it would be so much easier to have the input accept only currency values. Any ideas Thanks Ray
Moderators SmOke_N Posted February 18, 2007 Moderators Posted February 18, 2007 MsgBox(64, 'Info', _InputAmerican()) Func _InputAmerican() Local $sValue = '' Do $sValue = InputBox('Currency Only', 'Insert only American Currency Below', '', '', 200, 80) Until StringRegExp($sValue, '^\$*\d+(?:\.\d{0,2})?$') Return Number(StringReplace($sValue, '$', '')) EndFunc Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
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