Results 1 to 6 of 6

Thread: Simple script help

  1. #1
    Join Date
    Apr 2014
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default Simple script help

    okay, i'm pretty sure this is the correct section because this is pertaining to a runescape private server. But heres the scenerio...I want to create 100's of accounts for a server, without having to go throught all the acc creation stuff myself. I have already made a script to open a crap ton of tabs of the acc creation page. I'm having issues getting the script to put all the acc info in working.
    Code:
    program typeinfo;
    
    procedure keys;
    
    begin
    
    presskey(17+9); //left ctrl plus tab to go to a new tab
    wait(100);
    presskey(9);
    wait(100);
    presskey(9);   //these two tab down to username input
    wait(100);
    sendkeys("username", 100, 1000); //inputs username
    wait(100);
    presskey(9);  //tabs to pass
    wait(100);
    sendkeys("pass", 100, 1000); //inputs pass
    wait(100);
    presskey(9);  //tabs to email 
    wait(100);
    sendkeys("email@email.com", 100, 1000); //inputs email
    wait(100);
    presskey(9);  //tabs to email confirmation
    wait(100);
    sendkeys("email@email.com", 100, 1000); //inputs email confirmation
    wait(100);
    presskey(13); //presses enter
    wait(300);
    end;
    
    
    
    begin
    repeat keys;
    until(iskeydown(36)=true) //so it'll run until "home" key is pressed
    end.


    Now i'm getting errors with the presskey functions and i have no idea why, i assume i could make the mouse do all the work, but key shortcuts would be infinitely easier and involve a lot less lines of code. All help is greatly appreciated.

  2. #2
    Join Date
    Dec 2011
    Posts
    2,147
    Mentioned
    221 Post(s)
    Quoted
    1068 Post(s)

  3. #3
    Join Date
    Apr 2014
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Clarity View Post
    You should post the exact errors you are receiving so people can help more easily
    It just says "error compiling execption at line X" x being the ones with the presskey(9) function

  4. #4
    Join Date
    Oct 2013
    Location
    East Coast USA
    Posts
    770
    Mentioned
    61 Post(s)
    Quoted
    364 Post(s)

    Default

    Quote Originally Posted by sirgriffen69 View Post
    It just says "error compiling execption at line X" x being the ones with the presskey(9) function
    Strings use single quotes, not double quotes.

  5. #5
    Join Date
    Jan 2012
    Posts
    1,596
    Mentioned
    78 Post(s)
    Quoted
    826 Post(s)

    Default

    Quote Originally Posted by sirgriffen69 View Post
    Code:
    program typeinfo;
    
    procedure keys;
    
    begin
    
    presskey(17+9); //left ctrl plus tab to go to a new tab
    wait(100);
    presskey(9);
    wait(100);
    presskey(9);   //these two tab down to username input
    wait(100);
    sendkeys("username", 100, 1000); //inputs username
    wait(100);
    presskey(9);  //tabs to pass
    wait(100);
    sendkeys("pass", 100, 1000); //inputs pass
    wait(100);
    presskey(9);  //tabs to email 
    wait(100);
    sendkeys("email@email.com", 100, 1000); //inputs email
    wait(100);
    presskey(9);  //tabs to email confirmation
    wait(100);
    sendkeys("email@email.com", 100, 1000); //inputs email confirmation
    wait(100);
    presskey(13); //presses enter
    wait(300);
    end;
    
    
    
    begin
    repeat keys;
    until(iskeydown(36)=true) //so it'll run until "home" key is pressed
    end.
    So this
    Code:
    presskey(17+9); //left ctrl plus tab to go to a new tab
    line... you want to press ctrl and tab?
    because that is just going to press key 26.
    to press both, you would need to do a keydown(ctrlkey), presskey(tabkey), then keyup(ctrlkey) or something.

  6. #6
    Join Date
    Apr 2014
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Turpinator View Post
    So this
    Code:
    presskey(17+9); //left ctrl plus tab to go to a new tab
    line... you want to press ctrl and tab?
    because that is just going to press key 26.
    to press both, you would need to do a keydown(ctrlkey), presskey(tabkey), then keyup(ctrlkey) or something.
    Oh, i see...Thank you very much for this insight!

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
  •