----------------------------------- hackman Thu Sep 25, 2003 3:35 pm hotkeys ----------------------------------- First of all, im new here and new to programing. I started programing with turing about 4 weeks ago. Well anyway, i was wondering if anyone could tell me how to set a hotkey(ex. in a slotmachine game, how to make it so i just have to press space bar to pull the lever instead of typing Y +enter). Well thats all ive got to say for now. Thanks. ----------------------------------- Dan Thu Sep 25, 2003 5:04 pm ----------------------------------- for this you whould whont to use the getch comand. getch(string(1)) - note that string(1) is a string with only one letter or a charticher. ex. var name:string(1) %has to be string(1) or char put "Hi, what is the 1st letter of your name?" getch(name) put "your 1st letter is ", name now that is how you get input with out needing enter to be hit but you will need to use if's to check what button was hit. also getch puts the ACII char in the string(1) or char and not it's value so you will need to conver it. ex. var key : string (1) put "hit a key (hit esc key to exit)" loop getch (key) if ord (key) = 27 then %27 is the code for the esc key exit else put "the ACII value for that key is: ", ord(key) end if end loop this will stop the progaming from ruing while it weghts for input just like get but dose not need enter. if you whont an non-blocking way of doing it you wil have to use hasch or input.keydown (truing 4.x only)[/code] ----------------------------------- Tony Thu Sep 25, 2003 6:52 pm ----------------------------------- heh, Dan - are you forgetting Input.KeyDown? hackman - if you're using WinOOT 4.x , you're better off using Input.KeyDown - it generates a boolean array of all the keys pressed (well, as much as your hardware supports (which is usually 3 characters + 3 system). There's a tutorial on that somewhere under Turing -> Tutorials. ----------------------------------- hackman Thu Sep 25, 2003 9:16 pm ----------------------------------- Thank you so much! Everything is up and runing smooth now. p.s. im using version 3.1 somthin