MaximusCZ 4 Posted August 29, 2011 Hi, I have a problem. I am coppying one string from one textbox to another. Second textbox automaticly round it, but I need to check if It was pasted right (sometimes it fails, not problem of autoit, dont bother) Well, I got situation, when I have to copy 50.20490. When I copy it, It will round to 50.20 (thats OK) but once I select it from first form and round it by autoit function, I got 50.2, but I need 50.20 $A = 50.20490 $B = Round ($A, 2) $B = 50.2 I need $B = 50.20 Thanks for your help Share this post Link to post Share on other sites
MaximusCZ 4 Posted August 29, 2011 Never mind. I figured it out.. I Rounded that first var, so now im not comparing 50.20 with 50.2, but 50.2 to 50.2... Thanks for quick reply all of you;) And I dont see the point of not being able to edit my own posts, when there are no posts under it Share this post Link to post Share on other sites
martin 85 Posted August 29, 2011 Hi, I have a problem. I am coppying one string from one textbox to another. Second textbox automaticly round it, but I need to check if It was pasted right (sometimes it fails, not problem of autoit, dont bother) Well, I got situation, when I have to copy 50.20490. When I copy it, It will round to 50.20 (thats OK) but once I select it from first form and round it by autoit function, I got 50.2, but I need 50.20 $A = 50.20490 $B = Round ($A, 2) $B = 50.2 I need $B = 50.20 Thanks for your help $A = 50.20490 $B = stringformat("%0.2f",$A) ConsoleWrite($B & @CRLF) Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Share this post Link to post Share on other sites
martin 85 Posted August 29, 2011 Never mind. I figured it out.. I Rounded that first var, so now im not comparing 50.20 with 50.2, but 50.2 to 50.2... Thanks for quick reply all of you;)And I dont see the point of not being able to edit my own posts, when there are no posts under itYou should be able to edit your own posts, but maybe there is a restriction that you have to have 5 posts or some number first.Welcome to the AutoIt forums . Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Share this post Link to post Share on other sites