Results 1 to 18 of 18

Thread: How do I press a key or type words?

  1. #1
    Join Date
    Apr 2013
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default How do I press a key or type words?

    How do I get Simba to type words? I'm writing a simple script for automating a little webpage with a few buttons and text boxes.

    What should the format be like? So far I have,

    Simba Code:
    procedure Target;
    begin
    movemouse (409, 535)
    clickmouse (409, 535, 1)
    presskey (Helllooo;)
    end;

  2. #2
    Join Date
    Jun 2012
    Location
    Howell, Michigan
    Posts
    1,585
    Mentioned
    34 Post(s)
    Quoted
    553 Post(s)

    Default

    Quote Originally Posted by Popcorn View Post
    How do I get Simba to type words? I'm writing a simple script for automating a little webpage with a few buttons and text boxes.

    What should the format be like? So far I have,

    Simba Code:
    procedure Target;
      begin
        MMouse (409, 535, 5,5); // added correct format/randomization
        clickmouse (true); //dont need to move twice, just click :P
        sendkeys ('Helllooo', 250, 300); //should be in quote marks, and always have a semi-colon after a command is done
      end;

    Begin
      Target;
    end.
    Edited for you(:

  3. #3
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    try Sendkeys or typesend(if u want it to hit enter after typing the string)

    edit: your parameters are wrong srlking sendkeys('helloo', 300, 300); eg.

    Creds to DannyRS for this wonderful sig!

  4. #4
    Join Date
    Jun 2012
    Location
    Howell, Michigan
    Posts
    1,585
    Mentioned
    34 Post(s)
    Quoted
    553 Post(s)

    Default

    Quote Originally Posted by Sjoekeloe View Post
    try Sendkeys
    'd (; Im proud of me ! Usually you me

    Fixed as well, was typing quick

  5. #5
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Quote Originally Posted by SRLKing View Post
    'd (; Im proud of me ! Usually you me

    Fixed as well, was typing quick
    Nice , I don't like being ninja'd

    Creds to DannyRS for this wonderful sig!

  6. #6
    Join Date
    Jun 2012
    Location
    Howell, Michigan
    Posts
    1,585
    Mentioned
    34 Post(s)
    Quoted
    553 Post(s)

    Default

    Quote Originally Posted by Sjoekeloe View Post
    Nice , I don't like being ninja'd
    Ill let you have the next one...maybe(;

  7. #7
    Join Date
    Apr 2013
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Quote Originally Posted by SRLKing View Post
    Edited for you(:
    I get this:

    [Error] (8:22): Invalid number of parameters at line 7
    Compiling failed.
    Do you smell popcorn?

  8. #8
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Quote Originally Posted by SRLKing View Post
    Ill let you have the next one...maybe(;
    Game on Don't mess wtih karma baby.

    Creds to DannyRS for this wonderful sig!

  9. #9
    Join Date
    Apr 2013
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Can anyone help please?
    Do you smell popcorn?

  10. #10
    Join Date
    Jun 2012
    Location
    Howell, Michigan
    Posts
    1,585
    Mentioned
    34 Post(s)
    Quoted
    553 Post(s)

    Default

    Quote Originally Posted by Popcorn View Post
    I get this:
    Simba Code:
    procedure Target;
      begin
        MMouse (409, 535, 5,5); // added correct format/randomization
        clickmouse2 (true); //dont need to move twice, just click :P
        sendkeys ('Helllooo', 250, 300); //should be in quote marks, and always have a semi-colon after a command is done
      end;

    Use this instead, forgot to make it clickmouse2

  11. #11
    Join Date
    Apr 2013
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Quote Originally Posted by SRLKing View Post
    Simba Code:
    procedure Target;
      begin
        MMouse (409, 535, 5,5); // added correct format/randomization
        clickmouse2 (true); //dont need to move twice, just click :P
        sendkeys ('Helllooo', 250, 300); //should be in quote marks, and always have a semi-colon after a command is done
      end;

    Use this instead, forgot to make it clickmouse2
    Thanks, edited the mouse commands though because it made the mouse moves like a turtle.

    Is there any way for it to type faster?

    And what do the numbers in the sendkey line mean?
    Do you smell popcorn?

  12. #12
    Join Date
    Jun 2012
    Location
    Howell, Michigan
    Posts
    1,585
    Mentioned
    34 Post(s)
    Quoted
    553 Post(s)

    Default

    Quote Originally Posted by Popcorn View Post
    Thanks, edited the mouse commands though because it made the mouse moves like a turtle.

    Is there any way for it to type faster?

    And what do the numbers in the sendkey line mean?
    Mili seconds between letters sent are what they mean, change them to like 45, 50 and then use

    Simba Code:
    MouseSpeed := 20;

    to up the mouse speed

  13. #13
    Join Date
    Apr 2013
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Quote Originally Posted by SRLKing View Post
    Mili seconds between letters sent are what they mean, change them to like 45, 50 and then use

    Simba Code:
    MouseSpeed := 20;

    to up the mouse speed
    I find 1-2 works best, it's almost instant! After all, it's not like they're going to scan mouse clicks on a small website with less than 625 users, are they?

    Thanks for all the help, got it working perfectly.
    Do you smell popcorn?

  14. #14
    Join Date
    Jun 2012
    Location
    Howell, Michigan
    Posts
    1,585
    Mentioned
    34 Post(s)
    Quoted
    553 Post(s)

    Default

    Quote Originally Posted by Popcorn View Post
    I find 1-2 works best, it's almost instant! After all, it's not like they're going to scan mouse clicks on a small website with less than 625 users, are they?

    Thanks for all the help, got it working perfectly.
    No problem, and no they wont most likely...

  15. #15
    Join Date
    Apr 2013
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Quote Originally Posted by SRLKing View Post
    No problem, and no they wont most likely...
    Is there any way to repeat a script?

    I got this for my end, I read something on a tutorial about repeat until, but I can't get it to work.

    begin
    Target;
    end.
    Do you smell popcorn?

  16. #16
    Join Date
    Jun 2012
    Location
    Howell, Michigan
    Posts
    1,585
    Mentioned
    34 Post(s)
    Quoted
    553 Post(s)

    Default

    Quote Originally Posted by Popcorn View Post
    Is there any way to repeat a script?

    I got this for my end, I read something on a tutorial about repeat until, but I can't get it to work.
    Simba Code:
    begin
              repeat
                target;
              until(false)://Will repeat forever or until you stop, you can make other conditions as well

  17. #17
    Join Date
    Apr 2013
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Quote Originally Posted by SRLKing View Post
    Simba Code:
    begin
              repeat
                target;
              until(false)://Will repeat forever or until you stop, you can make other conditions as well
    Your help is much appreciated.
    Do you smell popcorn?

  18. #18
    Join Date
    Jun 2012
    Location
    Howell, Michigan
    Posts
    1,585
    Mentioned
    34 Post(s)
    Quoted
    553 Post(s)

    Default

    Quote Originally Posted by Popcorn View Post
    Your help is much appreciated.
    No problem, feel free to pm with any other questions :P

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
  •