# Omnimaga

## Calculator Community => TI Calculators => Axe => Topic started by: yoman82 on June 03, 2010, 03:28:10 pm

Title: GetKey help
Post by: yoman82 on June 03, 2010, 03:28:10 pm
Alright, Iá¸¿ having a bit of trouble here...
I wrote a program:
:.AC
:For(F,1,100)
:getKey->A
:Disp A
:End
To find out the getKey codes. I found the picture later, but that doesn't solve this problem...
Upon running it, the screen just prints garbage, completely random characters. It happens with all getKey commands. I tried including a>Frac after Disp A, but not good.
Help would be much appreciated.
Title: Re: GetKey help
Post by: nemo on June 03, 2010, 03:36:00 pm
Disp A
use
Disp A>Dec

A will be random gibberish, A>Dec will give you the actual value, and A>Frac gives you the code of an ASCII character
Title: Re: GetKey help
Post by: Happybobjr on June 03, 2010, 04:06:29 pm
try this
Code: [Select]
`:.AC:clrhome:0=>X:while X=0:getkey => X:!if X=0 : disp X >Dec :end                             math 2    for the >dec:end`
Title: Re: GetKey help
Post by: _player1537 on June 03, 2010, 04:12:22 pm
"!if X=0"  do "If X".  While X=0 should be repeat X.  just some random optimizations.  oh  and if you move disp X>dec outside of the loop, it will always not be zero.
Title: Re: GetKey help
Post by: yoman82 on June 03, 2010, 04:29:09 pm
Thanks a lot guys!
Title: Re: GetKey help
Post by: Happybobjr on June 03, 2010, 04:38:12 pm
"!if X=0"  do "If X".  While X=0 should be repeat X.  just some random optimizations.  oh  and if you move disp X>dec outside of the loop, it will always not be zero.
thanks