SRL Archive - Help/Questions

Simple script help


sirgriffen69

2014-10-08 04:34:18

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

2014-10-08 07:56:18

You should post the exact errors you are receiving so people can help more easily :)

sirgriffen69

2014-10-08 12:19:41

From: Clarity
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

2014-10-08 13:28:29

From: sirgriffen69
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

2014-10-08 13:31:02

From: sirgriffen69


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

2014-10-09 04:08:33

From: Turpinator
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!