SRL Archive - SRL Snippets

DoAction(Slot : Integer)


Dynamite

2012-12-13 17:24:45

I don't know if this has been made yet or anything but this is a simple DoAction function

Function DoAction(Slot : Integer): Boolean;
var
cx, cy: integer;
TextFound: Boolean;
Begin
Result := False;
if FindText(cx, cy, 'Enter', 'SmallChars', MSX1, MSY1, MSX2, MSY2) then
TextFound := True
else
Begin
ToggleActionBar(False);
Wait(RandomRange(500, 1000));
ToggleActionBar(True);
End;
if not IsActionBarOpen then
ToggleActionBar(True);
Result := SendKeys(Slot, 200, 100);
End;

-Boom

Mat

2012-12-13 17:26:29

What about if there is text already being typed at that time?
Mat

Justin

2012-12-13 17:27:52

From: Mat
What about if there is text already being typed at that time?
Mat


Valid point, didn't think of that.

Dynamite

2012-12-13 17:48:32

Ah yes, forgot about that, new function posted, it is not tested, please could someone?

-Boom

Mat

2012-12-14 10:27:53

It will still, do the typing, from what I can see.
Mat
E: Also why mainscreen search its in chat box.

Dynamite

2012-12-14 10:33:48

From: Mat
It will still, do the typing, from what I can see.
Mat
E: Also why mainscreen search its in chat box.


Closing and opening ActionBar resets chatbox.
Also wasn't sure about there being chatbox co-ords :P
MC1x/y ?

-Boom

footballjds

2012-12-14 10:54:41

what if the slot is 'a' not '1'?

Dynamite

2012-12-14 11:15:11

AFAIK it goes from 1 to =


Noob King

2012-12-14 11:19:45

From: Dynamite
AFAIK it goes from 1 to =



There are chat coords :p MCX1 ect.

Also you can right click and customize the keys.


Dynamite

2012-12-14 11:21:09

From: Noob King
You can right click and customize the keys.



Ah didn't know that alright I will edit when I get home

-Boom

Noob King

2012-12-14 11:26:52

From: Dynamite
Ah didn't know that alright I will edit when I get home

-Boom


I edited my post with a new pic. I always forgot puush doesn't work when I'm in directx mode.