
WayneA
USA
Asked
— Edited
Good Afternoon,
I am looking to create a numeric keypad within ARC. I want to pre-program a script for example 133. How do you combine the numbers into a string value, and that value is a number?
Thanks WayneA
What does the following below mean?
What if you wanted to shift or move down the input data to another string variable? Would that depend on the $order string variable right?
$order++ means you are adding the number one to it right
The first section of code can be replaced to
you don't need the power function... but what this does is when you press a key it will move the first number entered to a new column and then add the new number pressed.
so if you press 1 the entered number is 1 if you press 2 the entered number is now 10+2=12 if you press 3 the entered number is now 120+3=123
that way it is just like a calculator when entering numbers on the keypad.
the entered number is stored in $number you can store this value in a different variable if you wish but it would be an integer to start not a string. and order++ increases the amount of digits stored in $number... so by resetting order to 0 you enter a new number into the $number variable.
How would you store $number into another variable after you are done entering it?
a script to look at the count?
So...
You would create an enter button that signifies that you are done entering a number and then you would do as Rich said to store the value in another variable.