Results 1 to 5 of 5

Thread: How to send a keys plus an increasing variable

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

    Default How to send a keys plus an increasing variable

    How would I get this command to send a key plus a variable?

    Simba Code:
    Procedure CreateAccount;
      begin
        wait(RandomRange(2000,3000));
        MMouse(384, 395, 5, 5);
        ClickMouse2(1);
        wait(randomrange(1000,2000));
        Mouse(274,148,5,5,1);
        SendKeys('17', 25, 2);
        PressKey(13);
        SendKeys('*****************+x', 25, 2);
        PressKey(13);
        wait(500);
        SendKeys('*****************+x', 25, 2);
        PressKey(13);
        SendKeys('123456789', 25, 2);
        PressKey(13);
        SendKeys('123456789', 25, 2);
      end;

    I want x to increase everytime it is called, how do I use it with sendkeys?

    Ex) It creates the email *********+1, where 1 = x, so how do I make it increase X everytime it completes the cycle? so next time it will be ********+2 for the email and so on?

  2. #2
    Join Date
    Jan 2012
    Location
    Calgary, AB, Canada
    Posts
    1,819
    Mentioned
    5 Post(s)
    Quoted
    120 Post(s)

    Default

    Something like:

    Simba Code:
    Procedure CreateAccount;
    var
      x: integer;
    begin
      wait(RandomRange(2000,3000));
      MMouse(384, 395, 5, 5);
      ClickMouse2(1);
      wait(randomrange(1000,2000));
      Mouse(274,148,5,5,1);
      SendKeys('17', 25, 2);
      PressKey(13);
      SendKeys('*****************' + IntToStr(x), 25, 2);
      Inc(x);
      PressKey(13);
      wait(500);
      SendKeys('*****************' + InToStr(x), 25, 2);
      PressKey(13);
      Inc(x);
      SendKeys('123456789', 25, 2);
      PressKey(13);
      SendKeys('123456789', 25, 2);
    end;

    So 'x' will go up by one after the first one and then again after the second one
    Current Project: Retired

  3. #3
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    And just to add, you'll probably want to use a for loop instead, so that it will continue to up the numbers and make new accounts or whatever.

  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 Gucci View Post
    Something like:

    Simba Code:
    Procedure CreateAccount;
    var
      x: integer;
    begin
      wait(RandomRange(2000,3000));
      MMouse(384, 395, 5, 5);
      ClickMouse2(1);
      wait(randomrange(1000,2000));
      Mouse(274,148,5,5,1);
      SendKeys('17', 25, 2);
      PressKey(13);
      SendKeys('*****************' + IntToStr(x), 25, 2);
      Inc(x);
      PressKey(13);
      wait(500);
      SendKeys('*****************' + InToStr(x), 25, 2);
      PressKey(13);
      Inc(x);
      SendKeys('123456789', 25, 2);
      PressKey(13);
      SendKeys('123456789', 25, 2);
    end;

    So 'x' will go up by one after the first one and then again after the second one
    Thankyou! I for the life of me could not remember how to make it write an integer!

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

    Default

    Quote Originally Posted by i luffs yeww View Post
    And just to add, you'll probably want to use a for loop instead, so that it will continue to up the numbers and make new accounts or whatever.
    Already had it in another area :P I just could not get it to write my integer XD Thankyou!

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
  •