Results 1 to 14 of 14

Thread: Send Keys Problem

  1. #1
    Join Date
    Jan 2012
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default Send Keys Problem

    Hello everyone, I'll get straight to the point.
    I am trying to make the client hit spacebar and number keys with a small wait period in between.

    Here is what I attemped, but it didn't work:

    begin
    SendKeys(' ', 100); <----------------------space
    Wait(331 + Random(237));
    SendKeys('1', 100);
    Wait(331 + Random(237));
    SendKeys(' ', 100);<----------------------space
    Wait(331 + Random(237));
    SendKeys(' ', 100);<----------------------space
    Wait(331 + Random(237));
    SendKeys('4', 100);
    Wait(331 + Random(237));
    SendKeys(' ', 100);<----------------------space
    Wait(331 + Random(237));
    SendKeys(' ', 100);<----------------------space
    Wait(331 + Random(237));
    SendKeys(' ', 100);<----------------------space
    Wait(331 + Random(237));
    end;


    Suggestions/comments/advice?

  2. #2
    Join Date
    Jan 2012
    Posts
    713
    Mentioned
    3 Post(s)
    Quoted
    9 Post(s)

    Default

    Simba Code:
    Begin
    TypeSend(' 100');
    Wait(100 + Random(50));
    End;


    ^ This here will hit space then type 100. There ya go


    Simba Code:
    begin
    TypeSend(' ', 100);
    Wait(331 + Random(237));
    TypeSend('1', 100);
    Wait(331 + Random(237));
    TypeSend(' ', 100);
    Wait(331 + Random(237));
    TypeSend(' ', 100);
    Wait(331 + Random(237));
    TypeSend('4', 100);
    Wait(331 + Random(237));
    TypeSend(' ', 100);
    Wait(331 + Random(237));
    TypeSend(' ', 100);
    Wait(331 + Random(237));
    TypeSend(' ', 100);
    Wait(331 + Random(237));
    end;

    Type the whole thing out for you if you just wanted to copy and paste.
    Last edited by Google; 04-29-2012 at 06:32 PM.

  3. #3
    Join Date
    Feb 2012
    Location
    SRL Jail
    Posts
    1,319
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by GOOGLE View Post
    Simba Code:
    Begin
    TypeSend('    100');
    Wait(100 + Random));
    End;


    ^ This here will hit space 4 times then type 100. There ya go
    If i'm not wrong (and correct me if I am), this will only hit space once and then type 100, which in runescape is useless, because if you type space 100 or 1 times and then write 100 it still looks the same

  4. #4
    Join Date
    Jan 2012
    Posts
    713
    Mentioned
    3 Post(s)
    Quoted
    9 Post(s)

    Default

    Quote Originally Posted by JOEbot View Post
    If i'm not wrong (and correct me if I am), this will only hit space once and then type 100, which in runescape is useless, because if you type space 100 or 1 times and then write 100 it still looks the same
    Nope it will hit space however many times you hit space between the Apostrophe, so say " - " < this dash here is a space so if you were to do
    Simba Code:
    TypeSend('----Hi') // < these - are spaces for this example
    This would do 4 spaces then write Hi.

  5. #5
    Join Date
    Feb 2012
    Location
    SRL Jail
    Posts
    1,319
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    NVM, SRL cancelled your spaces and it looks like 1 space, sorry

  6. #6
    Join Date
    Jan 2012
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default

    Thanks for your quick reply.
    Trying it now.

  7. #7
    Join Date
    Jan 2012
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default

    Still not working.
    What I am trying to do is get the client to skip through some NPC dialogue.
    Since you can hit 'space' and it's the same thing as continue, i figured scripting just to sent spacebars and number keys would be the easiest.
    Any more suggestions?
    i need the script to type
    space
    1
    space
    space
    4
    space
    space
    space
    with 1/2 of a second intervals.

  8. #8
    Join Date
    Jan 2012
    Posts
    713
    Mentioned
    3 Post(s)
    Quoted
    9 Post(s)

    Default

    Quote Originally Posted by JOEbot View Post
    If i'm not wrong (and correct me if I am), this will only hit space once and then type 100, which in runescape is useless, because if you type space 100 or 1 times and then write 100 it still looks the same
    Quote Originally Posted by Ilya View Post
    Still not working.
    What I am trying to do is get the client to skip through some NPC dialogue.
    Since you can hit 'space' and it's the same thing as continue, i figured scripting just to sent spacebars and number keys would be the easiest.
    Any more suggestions?
    i need the script to type
    space
    1
    space
    space
    4
    space
    space
    space
    with 1/2 of a second intervals.
    Try This

    Simba Code:
    Begin
    TypeSend('  ');
    Wait(400 + Random(150));
    TypeSend('1');
    Wait(400 + Random(150));
    TypeSend('  ');
    Wait(400 + Random(150));
    TypeSend('  ');
    Wait(400 + Random(150));
    TypeSend('4');
    Wait(400 + Random(150));
    TypeSend('  ');
    Wait(400 + Random(150));
    TypeSend('  ');
    Wait(400 + Random(150));
    TypeSend('  ');
    End;

    Which Npc is this for anyway that you need to type numbers in, becasue there is an easier way going through NPC dialogue I just never heard of having to type numbers to that NPC.. ?

    If you can't figure it out send me a message over skype and I will gladly help you through.
    Last edited by Google; 04-29-2012 at 06:56 PM.

  9. #9
    Join Date
    Jan 2012
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default

    Trying now.
    Really appreciate your knowledge!!

  10. #10
    Join Date
    Jan 2012
    Posts
    713
    Mentioned
    3 Post(s)
    Quoted
    9 Post(s)

    Default

    Quote Originally Posted by Ilya View Post
    Trying now.
    Really appreciate your knowledge!!
    May I ask what the numbers are for, there a very simple way to write this with 4 lines but im confused as to why you need to type in numbers?

  11. #11
    Join Date
    Dec 2011
    Location
    The Netherlands
    Posts
    1,631
    Mentioned
    47 Post(s)
    Quoted
    254 Post(s)

    Default

    Quote Originally Posted by GOOGLE View Post
    May I ask what the numbers are for, there a very simple way to write this with 4 lines but im confused as to why you need to type in numbers?
    You can use numbers to talk in conversations. Eg. Typing a space == continue and typing '1' you would select option 1 on the possible options. Could be used for buying anti-dragon shields, for example. Speeds it up quite a lot.

    Script source code available here: Github

  12. #12
    Join Date
    Jan 2012
    Posts
    713
    Mentioned
    3 Post(s)
    Quoted
    9 Post(s)

    Default

    Quote Originally Posted by J J View Post
    You can use numbers to talk in conversations. Eg. Typing a space == continue and typing '1' you would select option 1 on the possible options. Could be used for buying anti-dragon shields, for example. Speeds it up quite a lot.
    Oh alright had no clue you could even do that, thanks for the info.

  13. #13
    Join Date
    Jan 2012
    Posts
    160
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default

    It is for buying something similar to Anti-Dragon Shields.

    Thanks again for all of your input.
    It's working for 15+mins now flawlessly.

  14. #14
    Join Date
    Jan 2012
    Posts
    713
    Mentioned
    3 Post(s)
    Quoted
    9 Post(s)

    Default

    Quote Originally Posted by Ilya View Post
    It is for buying something similar to Anti-Dragon Shields.

    Thanks again for all of your input.
    It's working for 15+mins now flawlessly.
    No problem glad to help.

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
  •