Results 1 to 5 of 5

Thread: if(KeyDown('m'))then

  1. #1
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default if(KeyDown('m'))then

    I want to make a list of commands so that I can run it and basically be able to do everything I want from the keyboard.

    But that command gives me an error.

    What command can I use to check and see if a key has been typed?

  2. #2
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    iskeydown

    keydown will actually press it, and it won't return a boolean, so it can't be used in the if condition

  3. #3
    Join Date
    Dec 2006
    Location
    Third rock from the sun.
    Posts
    2,510
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Ah, thanks. That was awfully quick.

    Does IsKeyDown need the keycode, or the letter? And does IsKeyDown need the letter in a string or not?

    Also, is there a different command to check if a string of letters have been typed?

    Thanks. God bless,

    Mike.

  4. #4
    Join Date
    Jan 2007
    Location
    USA
    Posts
    1,782
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    if(iskeydown('m'))then

    Join the fastest growing merchanting clan on the the net!

  5. #5
    Join Date
    Sep 2006
    Posts
    5,219
    Mentioned
    4 Post(s)
    Quoted
    1 Post(s)

    Default

    Letter as string, actually its char but that needs quotes just like string, so 'm'

    Other proc? Only if it is typed onto somewhere, you can read the text. As for just monitoring the keyboard, its just letter by letter. Just make an array of strings and loop through em.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. KeyDown
    By Championship in forum OSR Help
    Replies: 2
    Last Post: 12-07-2008, 06:51 PM
  2. KeyDown; and KeyUp;
    By skilld u in forum OSR Help
    Replies: 2
    Last Post: 01-30-2008, 11:44 PM
  3. KeyDown In C++
    By TravisV10 in forum C/C++ Help and Tutorials
    Replies: 2
    Last Post: 08-12-2007, 04:24 PM
  4. Keydown
    By skullbr00d in forum OSR Help
    Replies: 3
    Last Post: 06-07-2007, 06:11 PM
  5. keydown
    By raimis89 in forum OSR Help
    Replies: 4
    Last Post: 12-09-2006, 09:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •