cashkill23 0 Posted December 26, 2021 Report Share Posted December 26, 2021 I have a site where i should input BTC like this: 0.00000100 (8 decimals) in form i want to enter 100 only. How to convert so i get comma right? If i take 100 * 100000000 it gives a sience number in debugger. I cant use that. How to do? Thanks for help Quote Link to post Share on other sites
PRO 69 Posted December 27, 2021 Report Share Posted December 27, 2021 Here is some example code how it can be done: plugin command("Data and Files Automation.dll", "Data and Files Automation Set License", "YOUR-LICENSE-KEY") ui text box("Input Small Amount",#input_number) ui stat monitor("Output: ",#output_number) ui button("Convert if less than 1 BTC") { set(#output_number,#input_number,"Global") set(#count_characters,$plugin function("Data and Files Automation.dll", "$char count", #input_number, "False"),"Global") if($comparison(#count_characters,"< Less than",9)) { then { set(#how_many_zeros_to_add,$subtract(8,#count_characters),"Global") loop(#how_many_zeros_to_add) { set(#output_number,"0{#output_number}","Global") } set(#output_number,"0.{#output_number}","Global") } else { } } if($comparison(#count_characters,"> Greater than",8)) { then { alert("Attention. You have entered a large amount! Will set number to 0 for your safety.") set(#output_number,0,"Global") } else { } } plugin command("Data and Files Automation.dll", "set clipboard", #output_number, "Text") alert("Result: {#output_number} Copied to Clipboard!") } ----------------------------------- This script needs the Data & Files Automation Plugin to work (free starter version available): https://automaxed.com/plugins/data-and-files-automation Convert Small Numbers to 8 Decimal BTC Amount In the video the input 12345678 doesn't get converted to 0.12345678 - it is fixed already by now in the code above. Just didn't want to record another video after the correction 😄 Quote Link to post Share on other sites
cashkill23 0 Posted December 28, 2021 Author Report Share Posted December 28, 2021 Really great. I will check out all plugins there. Today i was ready and out with my first ubot bot for btc game. If ubot dev was not so buggy the work should go must faster. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.