Results 1 to 6 of 6

Thread: Using your Keyboard in a Script.

  1. #1
    Join Date
    Jul 2007
    Location
    NSW, Australia
    Posts
    62
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Using your Keyboard in a Script.

    Hey everyone,

    i was wondering how i could make the compass turn South East, so far, what i have is:
    Code:
      MakeCompass('E');
      Wait(1000 + Random (500));
    all i need to know is how i can get the script to hold down the left arrow key for about 500 miliseconds.

    please don't reply saying stuff like:
    Code:
      TypeSend('Left Arrow Key')
    i've tried it lol. and yes, i have looked in both the SCAR and SRL manuals - but i couldn't find anything usefull.

    Thanks in advance

    PS: if you have a list with all the Key Codes, could you please upload it for me?

  2. #2
    Join Date
    Aug 2007
    Posts
    429
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Actually it is in SCAR manual
    procedure SendArrowWait(Key: Byte; WaitTime: Integer);
    Sends an arrow to Client's window like SendArrow and holds it for a given wait time.
    Example:
    SendArrowSilentWait(1, 10); // Holds "Right" arrow for 10 milliseconds.

    For a, 0 = up, 1 = right, 2 = down, 3 = left.
    So
    SCAR Code:
    SendArrowWait(3, 500);


  3. #3
    Join Date
    Jul 2007
    Location
    NSW, Australia
    Posts
    62
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Derek- View Post
    Actually it is in SCAR manual

    So
    SCAR Code:
    SendArrowWait(3, 500);

    wow, i don't know how i missed that!

    Thanks heaps mate

  4. #4
    Join Date
    Aug 2007
    Posts
    429
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by ExotiQ View Post
    lol
    nice spam......

  5. #5
    Join Date
    Nov 2007
    Location
    UK
    Posts
    242
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Wouldn't
    SCAR Code:
    MakeCompass('SE')
    work just as well?

  6. #6
    Join Date
    Aug 2007
    Posts
    429
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    No only 'n', 'e', 's', and 'w' are usable with MakeCompass.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Keyboard Lock
    By lax_player16 in forum OSR Help
    Replies: 2
    Last Post: 12-17-2008, 06:02 AM
  2. How to use keyboard functions in a script..
    By Exist2inspire in forum OSR Help
    Replies: 3
    Last Post: 11-28-2008, 09:14 PM
  3. Disabling Keyboard...
    By Rich in forum OSR Help
    Replies: 6
    Last Post: 11-05-2008, 05:53 PM
  4. Help With KEY'S (On KeyBoard Lol) PLZ HELP!
    By Ultra in forum OSR Help
    Replies: 4
    Last Post: 07-25-2008, 10:28 PM
  5. Keyboard!
    By Here in forum News and General
    Replies: 16
    Last Post: 07-14-2007, 10:13 PM

Posting Permissions

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