Results 1 to 7 of 7

Thread: IsKeyDown(C: Char) freezes window?

  1. #1
    Join Date
    Oct 2007
    Posts
    24
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default IsKeyDown(C: Char) freezes window?

    Ok when i try to use this method it just freezes my java app? . Here is the code

    Code:
    program New;
    begin
    repeat
    if(IsKeyDown('a')) then begin
    sendkeys('a');
    keydown(13);
    sleep(1);
    keyup(13);
    Wait(1000); end;
    until(False);
    end.
    idgi ?

  2. #2
    Join Date
    May 2007
    Location
    Ohio
    Posts
    2,296
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Does your comp lag? if so maximize wait

  3. #3
    Join Date
    Oct 2007
    Posts
    24
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    well i target my app, press play and it freezes press stop and it's fine :s

  4. #4
    Join Date
    Apr 2007
    Posts
    3,152
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    possibly because as long as ur not holding the button down it keeps repeating. maybe a "do while" loop?(though it didnt lagg my comp(what do u mean java app?))

    im not sure
    SCAR Tutorials: The Form Tutorial | Types, Arrays, and Classes
    Programming Projects: NotePad | Tetris | Chess


  5. #5
    Join Date
    Apr 2007
    Location
    UK
    Posts
    2,295
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    He means his java applet. Like the runescape applet :P.

    Its fine for me here too.

    Rogeruk's Al-Kharid Tanner V1.1 [Released]
    Rogeruk's Barbarian Crafter [Coming Soon]
    Rogeruk's Guild Fisher [Coming Soon]
    !! - Taking Requests - !!

  6. #6
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    SCAR Code:
    program New;
    begin
      repeat
        if(IsKeyDown('a')) then
        begin
          sendkeys('a');
          keydown(13);
          sleep(1);
          keyup(13);
          repeat
            wait(50);
          until(not(IsKeyDown('a')))
        end;
        wait(50);
      until(False)
    end.

    Any better?
    Interested in C# and Electrical Engineering? This might interest you.

  7. #7
    Join Date
    Oct 2007
    Posts
    24
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ^ yes, thanks!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. IsKeyDown
    By 666d3v1l666 in forum OSR Help
    Replies: 6
    Last Post: 08-29-2008, 11:34 AM
  2. Char*, Char *, Char *var, Char var[] ... Me is confused...
    By Jason2gs in forum C/C++ Help and Tutorials
    Replies: 11
    Last Post: 04-17-2008, 02:56 PM
  3. iskeydown - need help
    By l33t_h4x0r in forum OSR Help
    Replies: 5
    Last Post: 12-16-2007, 11:31 PM
  4. Why my skript freezes rs window?
    By neeger in forum OSR Help
    Replies: 3
    Last Post: 11-04-2007, 03:18 AM
  5. What's IsKeyDown in C++ and how do I use it?
    By PwNZoRNooB in forum C/C++ Help and Tutorials
    Replies: 10
    Last Post: 08-14-2007, 05:49 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
  •