anixon Posted May 14, 2009 Share Posted May 14, 2009 When performing a subtraction say 99.64 minus .14 the result is 99.5 where as in currency format the result should be 99.50 how do I change the maths result from 99.5 to currency format including comma's where the value is 1000 or greater.... Help is always appreciated Ant.. Link to comment Share on other sites More sharing options...
Xand3r Posted May 14, 2009 Share Posted May 14, 2009 (edited) MsgBox(0 ,"" , StringFormat("%.2f",99.64-0.14)) just change the "2" to the number of decimals you want Edited May 14, 2009 by TheMadman Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro Link to comment Share on other sites More sharing options...
anixon Posted May 14, 2009 Author Share Posted May 14, 2009 MsgBox(0 ,"" , StringFormat("%.2f",99.64-0.14)) just change the "2" to the number of decimals you want Thanks for that since posting I also found the following solution which format with a 'comma' when the value is more than 1000 $Amt="1001.6" $dll=DllOpen("kernel32.dll") $GCF=DllCall($dll,"int","GetCurrencyFormat","int",0,"int",0,"str",$Amt,"int",0,"str","", "int",20) msgbox(0,"Dll Test",$GCF[5]) DllClose($dll) MsgBox(0 ,"" , StringFormat("%.2f",$amt)) Appreciate the help Ant.. Link to comment Share on other sites More sharing options...
Xenobiologist Posted May 14, 2009 Share Posted May 14, 2009 Hi, be careful with that function. It reacts on locale settings. Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
GEOSoft Posted May 14, 2009 Share Posted May 14, 2009 Hi,be careful with that function. It reacts on locale settings.MegaWhich is one of the nice things about it IMHO. Just be really carefull not to pass it a number with thosands separators added George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
anixon Posted May 14, 2009 Author Share Posted May 14, 2009 Thanks for the replies and advice which is very much appreciated Ant.. Link to comment Share on other sites More sharing options...
anixon Posted May 14, 2009 Author Share Posted May 14, 2009 Which is one of the nice things about it IMHO. Just be really carefull not to pass it a number with thosands separators addedBased on LatLon is yours the red car out the front or back? Ant.. Link to comment Share on other sites More sharing options...
GEOSoft Posted May 15, 2009 Share Posted May 15, 2009 It better be in the back yard behind a fence (or in the garage) and the last time I looked it wasn't red. If you tried that with Google Earth it's off by abot 60 yards. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
anixon Posted May 15, 2009 Author Share Posted May 15, 2009 It better be in the back yard behind a fence (or in the garage) and the last time I looked it wasn't red. If you tried that with Google Earth it's off by abot 60 yards.Just think what Hubble could see if it was pointing the other way now is that the Times you are reading? Ant.. 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