
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
Enter it in the right order. You could easily add in a cancel button which would simply reset the $keycode to 0 and $sequence to 1 but you couldn't expect a human to know you meant 237 if you said 732 so how can you expect a computer?
The cancel button code would be
Thank You! Rich!
@WayneA Have a look at this. It's still a work in progress but it should give you an example on how to do calculations and receive the entered number in the correct order if you haven't fixed that problem yet
Calculator - Mobile Interface
The only thing wrong with it is that there is no decimal point and that you have to hit equal after each operation excluding the initial number input.
I have not been able to figure out the order yet. VGosine your script was a really big help. I truly do thank you.
After almost a couple of hours playing with both scripts, I have decided to just give up. Thank You for all of your help.
I just made some changes to the file try it again ... And my script enters the number in the order you enter it so if you type 6 then 8 then 2 you will have 682 in a variable stored...
Try your calculator file that you posted?
Yeah if you try the calculator file, when you press the numberpad buttons they enter the number in the order you press it... i'm not sure it that's helpful but this was the code:
This code is called when a button is pressed and the value of currentnum is changed to the number on the button you press. To run the calculator you would need to declare the variables first by starting the script "Variables".