Author Topic: GetKey help  (Read 5577 times)

0 Members and 1 Guest are viewing this topic.

Offline yoman82

  • LV3 Member (Next: 100)
  • ***
  • Posts: 71
  • Rating: +1/-1
    • View Profile
GetKey help
« 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.

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: GetKey help
« Reply #1 on: June 03, 2010, 03:36:00 pm »
instead of
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


Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: GetKey help
« Reply #2 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
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

_player1537

  • Guest
Re: GetKey help
« Reply #3 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.

Offline yoman82

  • LV3 Member (Next: 100)
  • ***
  • Posts: 71
  • Rating: +1/-1
    • View Profile
Re: GetKey help
« Reply #4 on: June 03, 2010, 04:29:09 pm »
Thanks a lot guys!

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: GetKey help
« Reply #5 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
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________