Quick question

how do i make a button get a variable from an input box?
worked it out myself-_-
on (press, keyPress “<Enter>”) {
Total = Number(One)+Number(Two);
}