MaximusCZ Posted August 29, 2011 Share 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 Link to comment Share on other sites More sharing options...
MaximusCZ Posted August 29, 2011 Author Share 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 Link to comment Share on other sites More sharing options...
martin Posted August 29, 2011 Share 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. Link to comment Share on other sites More sharing options...
martin Posted August 29, 2011 Share 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. 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