SRL Archive - News and General

LOL! I found a way out of the 6 Hour logout :D


Sin

2012-02-12 19:01:39

I was considering this idea, if it detects a bitmap of the login screen then to hit the refresh button :o

weequ

2012-02-12 19:03:45

From: Sin
I was considering this idea, if it detects a bitmap of the login screen then to hit the refresh button :o
Doesn't work in smart. Years ago I made Harry's fight caver refresh rs when rs updated :p

Sin

2012-02-12 19:08:51

Ik, i was talking about the client :p

Shuttleu

2012-02-12 19:10:19

From: Sin
Ik, i was talking about the client :p


there is a refresh button in the rs client?

~shut

Kyle Undefined

2012-02-12 19:19:37

In the browser there is :p

Sin

2012-02-12 19:25:23

Yeah, just manually add the coords of the refresh button.
Ofc, the FBI might ban you if theres no IRL antiban…

Solidone40

2012-02-12 19:32:20

Why did I not think of that? :duh:

Anyway, much love for you Sin haha good thinking.

Bwuk

2012-02-12 19:33:04

From: Solidone40
Why did I not think of that? :duh:

Anyway, I love you SIN haha.

~no homo?

Swagger

2012-02-12 19:33:23

You can refresh the SMART client?

Brandon

2012-02-12 19:35:02

From: Swagger
You can refresh the SMART client?


Absolutely not..

x[Warrior]x3500

2012-02-12 19:49:33

if you refresh the internet browser, wont it have a new client, thus all the chords will be set to a different client and not work…?

EDIT: try it out -


program new;
{$I SRL/SRL.simba}


begin
setupsrl;
mmouse(50,50,1,1);

end.

it changed the chords after a refresh for me

Sex

2012-02-12 20:01:51

From: ggzz
Absolutely not..

I'm in your signature :cool:.

On topic: I believe when you refresh the page the handle of the client will change and you'll lose focus and somehow have to refocus it :) (this will, as stated above, change the coords).

Brandon

2012-02-12 20:20:37

From: Sex
I'm in your signature :cool:.

On topic: I believe when you refresh the page the handle of the client will change and you'll lose focus and somehow have to refocus it :) (this will, as stated above, change the coords).


Haha of course.

On Topic:

Find the process and set the owner/parent window as the target.. If it's your browser then find the child window of it that contains the java applet and whala..

function FindAndSetTarget(TitlePrefix: String; SetAsTarget: Boolean): Boolean;
var
T: TSysProcArr;
I: Integer;
begin
T:= GetProcesses();
for I := 0 to high(T) do
if StartsWith(TitlePrefix, T[i].Title) then
begin
Result := True;
if SetAsTarget then
begin
SetTarget(T[i]);
ActivateClient;
end;
end;
end;

bg5

2012-02-12 23:24:04

Something like:

program new;
{$i SRL/SRL.simba}

function FindAndSetTarget(TitlePrefix: String; SetAsTarget: Boolean): Boolean;
var
T: TSysProcArr;
I: Integer;
begin
T:= GetProcesses();
for I := 0 to high(T) do
if StartsWith(TitlePrefix, T[i].Title) then
begin
Result := True;
if SetAsTarget then
begin
SetTarget(T[i]);
ActivateClient;
end;
end;
end;

procedure PressKey2(key : word);
begin
keydown(key);
wait(20+random(20));
keyup(key);
end;

begin
setupsrl;
activateclient;
// Now RS aplet is set as target
wait(500);
writeln(FindAndSetTarget('Rune',TRUE)); // Set Browser as target
wait(500);
mouse(190,146,1,1,1); // click above rs window to activate browser
PressKey2(116); //f5
wait (1000);

// Return back to RS Applet - no idea

end.

Idk how to set target back to RSAplet ,I didn't find proper function. GetProcesses search by window's caption.

wantonman

2012-02-15 01:12:52

cant you use appa as well for refreshing the page lets say if you do not want to have simba take control overyour mouse?

P1nky

2012-02-15 02:14:07

I thought of this once, though it would not work for SMART, and also I wouldn't want to use RS client. Quite annoying, I rather browse and have my Bots running all at the same time.

Kave

2012-02-15 02:57:45

From: P1nky
I thought of this once, though it would not work for SMART, and also I wouldn't want to use RS client. Quite annoying, I rather browse and have my Bots running all at the same time.


Could use in a vmware/virtualbox for that one special bot :p

P1nky

2012-02-15 03:00:13

From: Kave
Could use in a vmware/virtualbox for that one special bot :p


Hahaha to be honest, while writing that post, I was thinking about VM's ;)
*sigh* I need some sleep. Goodnight.

bg5

2012-02-15 03:34:32

From: wantonman
cant you use appa as well for refreshing the page lets say if you do not want to have simba take control overyour mouse?


APPA don't work with Simba.

Failure

2012-02-15 06:18:25

Can't you do like when a update occurs, you must re-run Simba ofcourse, if the update occurs why not activate the Simba and make it click the Run button again and wait till SMART loaded wouldn't that be possible?

bg5

2012-02-15 07:10:39

@Up

Wow ,It's good way of thinking.


I have an idea!

Simba can be re-run by external aplication. It is my frame:

Project1:

in script:

if (RSUpdated) then
begin
FindAndSetTarget('SimbaReRunner',TRUE); // SimbaReRunner - find better name? :p
PressKey( KEY_FOR_ACTIVATION);

end;

SimbaReRunner can be just console app and it will work in background.
Now in SimbaReRunner:


{ PSEUDOCODE }

if WaitUntilKeyDown(KEY_FOR_ACTIVATION) then
KillProces('SMART');
KillProces('Simba');

Open .Bat file;

I can't do this ,because of lack proper abilities and compiler ,but maybe someone will take care of it :)

Failure

2012-02-15 07:45:03

From: beginner5
@Up

Wow ,It's good way of thinking.


I have an idea!

Simba can be re-run by external aplication. It is my frame:

Project1:

in script:

if (RSUpdated) then
begin
FindAndSetTarget('SimbaReRunner',TRUE); // SimbaReRunner - find better name? :p
PressKey( KEY_FOR_ACTIVATION);

end;

SimbaReRunner can be just console app and it will work in background.
Now in SimbaReRunner:


{ PSEUDOCODE }

if WaitUntilKeyDown(KEY_FOR_ACTIVATION) then
KillProces('SMART');
KillProces('Simba');
OpenFile('C:\Users\Simba\scripts\SimbaDung.simba'); // file name and path can be send by simba.

// And here is little problem ,because after open file ,you must run script ,but //someone with knowladge in libraries will know how to do it.

ActivateWindow('SimbaDung');
Press(F9);

I can't do this ,because of lack proper abilities and compiler ,but maybe someone will take care of it :)


Hhehe thanks seems good, might with some help you'll get it.

I personally don't see why it wont be possible if it works with the browser, why not with Simba itself? Sure with MSI it'll be harder but I guess it wont be impossible to make a MSI checker (And use the already filled in details to run).

Richard

2012-02-15 09:41:44

If you're happy with the memory build up, you can quite simply do this:

procedure ReloadSMART;
begin
SMART_Server := {new server that wasn't being used before, perhaps a random one in an array};
SetupSRL;
end;

That just add this line at the start of your mainloop:

SRL_Procs[srl_OnRSUpdate] := @ReloadSMART;

This way you maintain progress reports, but you build up a lot of memory, which can make Simba lag.

Sin

2012-02-15 09:47:46

Oh..
I have 6GB RAM, all I need is for it to run overnight.
Feasible?

Richard

2012-02-15 09:54:49

From: Sin
Oh..
I have 6GB RAM, all I need is for it to run overnight.
Feasible?


I have 8GB and I find it enough, so I expect it'll be fine for you. The only problem with SMART is that Java has the worse garbage system ever. You can always use Harry's way of destroying all resources and reloading from cmd.

Sin

2012-02-15 09:57:12

I don't mind, I just need it to last the night.

Main

2012-02-15 10:14:24

Ye memory builds up, so its a safe bet calculating your planned run time, times by 500 and divides by 6.

so all night would be 1 gb of extra ram per smart. Not that bad eh?

Richard

2012-02-15 10:20:25

From: Main
Ye memory builds up, so its a safe bet calculating your planned run time, times by 500 and divides by 6.

so all night would be 1 gb of extra ram per smart. Not that bad eh?


Are you assuming that SMART takes half a gig to run? I've found it to be far closer to 200MB.

Sin

2012-02-15 10:22:11

From: Richard
Are you assuming that SMART takes half a gig to run? I've found it to be far closer to 200MB.


Mine takes about 400MB lol.