SRL Archive - First Scripts

First script - Very simple autologin and load firefox


newber_dan

2008-11-22 22:11:22

Hey guys this is my very first script, it's only a very basic login script that uses predefined co-ordinates, this will only work if firefox is in the 2nd position of your quick-launch bar, your screen resolution is set to 1204x768 and you have an internet connection of 64kbs or faster

so what does my script do? the script will open up firefox, load runescape.com, click free user (the button that takes you to login screen from the runescape homepage), click the login button, enter your login details and login(must be defined by editing the script and inputting your own details) then click the confirmation screen button to log you in completely automatically.

please be gentle, p.s the section of the script you must edit is TypeUserAndPass and can be found at about 2/3 through the script

Griff

2008-11-23 15:47:12

First off, way to start scripting. Its a lot of fun. Second, PM me if you ever need help. I'll help you with one part right here.
When people are setting up a script, it works best when all the things they need to fill in are at the top. Constants can be used for this. For example, you need to go and enter user and pass 2/3 way down the script. So, for you, you make a constant section, like this.
program Woodcutter;
{.include SRL\SRL.scar}

const

User = 'enter username';
Pass = 'Enter pass';

procedure OpenFirefox;

Now, so you can put that in a procedure, we will go down and do that.So your typing procedure will now go like this:

procedure TypeUserAndPass;
begin
TypeSend(User) //enter username
WriteLn('Username entered')
Wait(5000+Random(200))
TypeSend(Pass) //enter password
WriteLn('Password entered, logging in')
Wait(5000+Random(5000))
end;

I hope that helped, and once again, feel free to pm me if you need help.

-Griff

newber_dan

2008-11-24 02:20:45

thanks griff.. i wasnt quite sure how to work with constants so thanks

Bad Processor

2008-11-24 14:06:10

Hey, you started scripting like me, with predefined co-ordinates. We must be mentally linked because no-one else seemed to. Anyways i cant try it because
I have a 1280x800 monitor, and if i change it, it changes back because of 'screen driver error: Resolution not suitable for this monitor'. Quite good for a newbie though.

– BadProcessor

Griff

2008-11-24 21:52:41

I have a sidescreen too, Mmouse is bad to use anyways, so hat isn't that bad anyways. You could try using TPAs for your login. Try looking at some tuts, and them pm me with your questions.

-Griff