Asked — Edited

Numeric Keypad - Mobile Builder

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


ARC Pro

Upgrade to ARC Pro

Get access to the latest features and updates before they're released. You'll have everything that's needed to unleash your robot's potential!

#25  

What does the following below mean?


ELSE
 $number=$number*Power(10,1)
 $number=$number+$currentnum
 $order++
EndIf

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?


IF ($order=0)
$number=$currentnum
$order++

$order++ means you are adding the number one to it right

Trinidad/Tobago
#26  

The first section of code can be replaced to


ELSE
 $number=$number*10
 $number=$number+$currentnum
 $order++
EndIf

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.

#27  

How would you store $number into another variable after you are done entering it?

a script to look at the count?

United Kingdom
#28  
$newvariable = $oldvariable

So...

$anothervariable = $number
Trinidad/Tobago
#29  

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.