Page 1 of 1

same numeric button

Posted: Tue Jan 20, 2015 2:28 am
by parsec
I like to use same numeric buttons to enter values in different fields when the field is in focus. Also how to accomplish to enter number in the fields I understand the code below but if I need to enter 123 how do I do that thank you
on mouseUp
put "2" into field "number"
end mouseUp

Re: same numeric button

Posted: Tue Jan 20, 2015 3:03 am
by Simon
Hi parsec,
Welcome to the forums!

Change "into" to "after"

Code: Select all

on mouseUp
put 2 after field "number"
end mouseUp
also you can drop the quotes around the number.

Simon

Re: same numeric button

Posted: Tue Jan 20, 2015 12:12 pm
by parsec
Thank you Simon
What I like to accomplish is this.
Build a Stack with 3 fields and 10 numeric buttons when a field gets focus I like to enter a numeric value from any of the 10 buttons
J

Re: same numeric button

Posted: Tue Jan 20, 2015 12:31 pm
by zaxos
Hello parsec.
If i understand correct this is what you need:

Code: Select all

on mouseUp
put 2 after the selectedField
end mouseUp
this code puts 2 after the field that is currently in focus :)

Re: same numeric button

Posted: Tue Jan 20, 2015 12:56 pm
by parsec
thank's got it