SRL Archive - RS Scripts

Help with my autologin!!(First autologin for me)


wade11

2006-12-19 12:30:59

ok here is script:
program Autologin;
var
Username, Password:
//USERNAME SETUP//

const
Username = 'Insert username here';//Username that you want to login on.
Password = 'Insert Password Here';//Password that you want to use.
Procedure Login;
begin
ClickMouse (762, 339, True)
ClickMouse (678, 408, True)
ClickMouse (512, 335, True)
Wait(100000)
ClickMouse (575, 541, True)
SendKeys(Username+chr(13));
Wait(1000+random(100));
SendKeys(Password);
Clickmouse(426, 569, True)
end.
ok here is the error i get:
Failed when compiling
Line 6: [Error] (6:1): Identifier expected in script
PLease help!!!
:f: :f: :f: :f: :f: :f:
:fiery: :fiery: :fiery:

Pentti

2006-12-19 12:36:42

just take all out of variables, If you already have username and password in consts, you dont need to put em into variables. And procedure must end with End; not with End.
And if you use variables sometimes, you must put them like this:
Username, Password:string;
Because your variable type is string you write after them
:String;
Hope this helps. :)

wade11

2006-12-19 12:38:54

Failed when compiling
Line 6: [Error] (6:11): Semicolon (';') expected in script
Is the error i get now!(sorry i am a scripting noob!!)

wade11

2006-12-19 12:41:40

SORRY FOR DOUBLE POST—
scratch that i have this script now:

program Autologin;

const
Username = 'Insert username here';//Username that you want to login on.
Password = 'Insert Password Here';//Password that you want to use.

Procedure Login;
begin
ClickMouse (762, 339, True)
ClickMouse (678, 408, True)
ClickMouse (512, 335, True)
Wait(100000)
ClickMouse (575, 541, True)
SendKeys(Username+chr(13));
Wait(1000+random(100));
SendKeys(Password);
Clickmouse(426, 569, True)
end;
so please see error and give me working script ok?

Pentti

2006-12-19 12:54:54

program Autologin;
//var
//Username, Password:
{These are already in consts,
You dont them in variables anymore}

const
Username = 'Insert username here';//Username that you want to login on.
Password = 'Insert Password Here';//Password that you want to use.
Procedure Login;
begin
ClickMouse (762, 339, True)
ClickMouse (678, 408, True)
ClickMouse (512, 335, True)
Wait(100000)
ClickMouse (575, 541, True)
SendKeys(Username+chr(13));
Wait(1000+random(100));
SendKeys(Password);
Clickmouse(426, 569, True)
end; //Procedure ends with "End;" not with "End."

begin
LogIn;
end. //Main loop ends with "End."
Oh yea, you also must put "Main loop" in the scar. it does your procedure, you see it at the end of this script. :)

wade11

2006-12-19 15:24:17

thanks! had to do shopping!

Pentti

2006-12-19 15:34:43

From: wade11
thanks! had to do shopping!


No problems. I you have any more problems, I can help. :D

IronTeapot

2006-12-19 15:36:03

instead of just helping him solve his errors that hes posting, you should also fix it to use SRl procedures, not base scar ones. This is an SRL site as it is.


program Autologin;
{.include SRL/SRL.Scar}
// Changed all scar clickmouses to BETTER SRL mouse procedures.
const
Username = 'Insert username here';//Username that you want to login on.
Password = 'Insert Password Here';//Password that you want to use.
Procedure Login;
begin
//assuming the next 3 mouse things click play rs, the quality, and best world buttons
Mouse (762, 339,1,1,True)
Mouse (678, 408,1,1,True)
Mouse (512, 335,1,1,True)
Wait(100000)// im assuming this is waiting for the client to load? BAD way to do it.
Mouse (575, 541,1,1,True)
Typesend(Username+chr(13));//use the srl text typing feature
Wait(1000+random(100));
Typesend(Password);
Mouse(426, 569,1,1,True)
end; //Procedure ends with "End;" not with "End."

begin
SetupSRL;
LogIn;
end. //Main loop ends with "End."

wade11

2006-12-19 16:38:30

Pentti ummm pm me ok? I would like some lessons on scripting if possible!!

Pentti

2006-12-20 01:32:20

From: wade11
Pentti ummm pm me ok? I would like some lessons on scripting if possible!!


yeah sure. :)

joey0101

2006-12-29 12:22:50

Wait(100000)//


here's how to improve this:

repeat// Repeats the code below
GetColor((x, y)= somecoloryouchose){Change 'somecoloryouchose' with a
color that you only see on the loginscreen like a light grey, then get
the coordinates of this color and replace it with x and y //If find a
color in the specifide area then returns true}
until(getcolor((x, y)...//you know what i mean// Breaks from the loop when it Gets the color in the specified coordinates

replace the wait(10000) with this peice of code

wade11

2006-12-29 22:21:55

Thank you! i needed to know that