Results 1 to 4 of 4

Thread: Keyboard Detecter

  1. #1
    Join Date
    Jan 2010
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Keyboard Detecter

    Hi, sorry if this has been asked before, but is there any function that detects keyboard inputs? Something so when I have the script running and I press the up arrow, it automatically moves my mouse or something similar. Thanks in advance.

  2. #2
    Join Date
    Oct 2009
    Location
    Stockton, CA
    Posts
    2,040
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    PHP Code:
    function IsMouseButtonDown(LeftButtonBoolean): Boolean;
      If 
    LeftButton is truethen it checks if the left mouse button is down.
    If 
    LeftButton is falsechecks if the right mouse button is down.
     function 
    IsFunctionKeyDown(KeyByte): Boolean
      
    Checks if the given function key is down
    Meanings of Key:
      
    0SHIFT
      1
    CONTROL
      2
    ALT
      3
    LEFT SHIFT
      4
    LEFT CONTROL
      5
    LEFT ALT
      6
    RIGHT SHIFT
      7
    RIGHT CONTROL
    8
    RIGHT ALT
     
    function IsFKeyDown(Num:    Byte): Boolean
    Num 1..12Checks if F1F2, ... F11 or F12 key is down  corresponding to Num.
     function 
    IsArrowDown(Num:    Byte): Boolean;
      
    Checks if arrow key is downNum corresponds to 0 up=  rightdownleft.
     function 
    IsKeyDown(CChar): Boolean
      
    Checks if the given key is down
    Example:
    if(
    IsKeyDown('a'))then
      Writeln
    ('You have pressed "a". Congratulations!');
     function 
    IsNumpadKeyDown(KeyByte): Boolean;
    Checks if the entered numpad key is down (you just enter a digit). 
    Press F1 while SCAR is focused.
    Join the IRC! irc.rizon.net:6667/srl | SQLite (0.99rc3+) | SRL Doc | Simba Doc | Extra Simba Libraries (openSSL & sqlite3)
    Quote Originally Posted by #srl
    10:45 < Toter> daphil when can get sex anyday I want
    10:45 < Toter> he is always on #SRL
    "A programmer is just a tool which converts caffeine into code"

  3. #3
    Join Date
    Jan 2010
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks, this is going to help me a lot.

  4. #4
    Join Date
    Sep 2009
    Posts
    580
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    sweet
    I don't check this place often, sorry.

    Currently working on - Software Engineering degree. Thank you SRL for showing me the one true path

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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