Jump to content
Sign in to follow this  

Still Need Math Help

Recommended Posts


Sorry to say that I am still pulling my hair out over this... and I know it's not your faults that i'm just not grasping the syntax. :whistle: Let's start from scratch with this. Say, I create a gui that has the following qualifications:

Three input boxes

One label

One button *optional

I want the fist input box to be a starting balance. The second input box will be for a payment and the third for a deposit, all should be able to accept only dollar amounts and cents i.e. 100.00, 2.50 etc... The fourth element, a label will be where the remaining balance will show. The label won't be editable -it will just show the dollar amount of the equation. Now, depending on simplicity; I would like the calculations to be done as the numbers are entered in the fields but if it's too big of a deal to pull off a button to do the calculations will be fine.

What I need as a formula is this:

Starting balance minus ( - ) the payment plus ( +) the deposit will ( =) the balance

Thanks again

Share this post

Link to post
Share on other sites

It is around what you ask you still need to ajust the button. Perhaps none are needed. working with 102.13

GUICreate("My balance GUI")
$startbalance = GuiSetControl ("input", "0", 10, 10, 50)
$payment = GuiSetControl ("input", "0", 70, 10, 50) 
$deposit = GuiSetControl ("input", "0", 130, 10, 50) 
$balance = GuiSetControl ("Label", "0", 195, 10, 50) 

;($balance - $payment) + $deposit = $balance
While GuiMsg()>0

I hope that help. Tell me what you need more in the doc.

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.