Results 1 to 5 of 5

Thread: KeyDown not registering

  1. #1
    Join Date
    Mar 2017
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default KeyDown not registering

    Just as a disclaimer, I'm incredibly new to Simba and scripting as a whole. I've only been learning it for less than a week so please bear with me.

    I've been trying to create a script for PokeMMO. I've figured out most of the functions necessary to make it work but I've been having trouble with emulating key presses. When activating the client the keys simply don't work for whatever reason. I've tested on other applciations and it works perfectly fine. If anyone could explain why that is I'd greatly appreciate it.

    Code:
    begin
      repeat
        KeyDown (39);
        Wait (RandomRange(2000, 3000));
        KeyUp (39);
        Wait (50);
        KeyDown (37);
        Wait (RandomRange(2000, 3000));
        KeyUp (37);
      until FindColorSpiralTolerance (x, y, 13489371, 0, 0, 0, 0, 20);
    end

  2. #2
    Join Date
    Jul 2019
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    If it works outside the client but not inside then I am guessing the problem could be something to do with the fact that Simba uses virtual clicks rather than hardware clicks. Some games can detect that it is a virtual key press and not a real hardware key press and ban you for it so perhaps they have stopped them from registering in this case.

  3. #3
    Join Date
    Feb 2012
    Posts
    224
    Mentioned
    1 Post(s)
    Quoted
    8 Post(s)

    Default

    try other typing function? SRL has a bunch. Here's a demo:

    Simba Code:
    program new;
    {$I srl-6/srl.simba}

    begin
    activateclient;
    typebyte(VK_A);
    presskey(VK_A);

    keydown(VK_A);
    wait(50);
    Keyup(VK_A);

    typebytewait(VK_A,50); // same as typebyte but has some delay btw key up and down
    end.

    Also make sure you drag simba green crosshair on the window/client and focus it with activateclient maybe

  4. #4
    Join Date
    Jul 2019
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Cool I didn't know about typebyte and ativateclient. That is good to know but I would be careful with them wait(50)s if they have bot detection. Simba uses "Wait(Trunc(srl.SkewedRand(60,45,180)));" in the presskey procedure which is much less likely to get you banned.

  5. #5
    Join Date
    Mar 2017
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I didn't know about these but I've tested them and it still isn't registering. I was using activate client before and the key presses register in the chatbox. I think they're blocking virtual key presses like fookinel said.

Thread Information

Users Browsing this Thread

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

Posting Permissions

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