PDA

View Full Version : Simple script help



sirgriffen69
10-08-2014, 08:34 AM
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.


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.

Clarity
10-08-2014, 11:56 AM
You should post the exact errors you are receiving so people can help more easily :)

sirgriffen69
10-08-2014, 04:19 PM
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

bonsai
10-08-2014, 05:28 PM
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.

Turpinator
10-08-2014, 05:31 PM
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
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.

sirgriffen69
10-09-2014, 08:08 AM
So this
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!