SRL Archive - OSR Outdated Tutorials

TUT - Finding and clicking chatbox widgets!


Sin

2012-02-29 16:30:14

Hey guys, today i'm writing my first tutorial.
We'll go over how to choose options in the chatbox.

For example -

We want it to choose the orb!

There are two main types of choosing items in the chatbox.
DTMs
MouseBox

MouseBox method
First of all, we're going to want to get the object we want to click into the

main screen.

All we have to do is MouseBox the arrow.
Now this method isn't very efficient as we'll have to call this everytime we

start the script.


We'll call a simple MouseBox -


MouseBox(495,410,507,453,3);
Now what it does -

MouseBox(495,410,507,453,3);

The bolded part is the first POINT of the box that you want to make.


MouseBox(495,410,507,453,3);

The bolded part is the second POINT of the box that you want to make.


MouseBox(495,410,507,453,3);

Lastly, the 3 is a mouse_Move function, which moves but not clicks the specified

box.


After, we'll have this.


Now again, it's a simple matter of MouseBoxing it.





MouseBox(266,412,304,441,1);
Simple stuff, only change is 1, which moves and clicks at the same time.

And we're done! Now add a wait/until, static wait or anything!


DTM method
First off, we'll make a DTM of the Orb



DTM := DTMFromString

('mlwAAAHicY2dgYLjAyMBwEYivA/E1ID4NxKeg7IVAvAKI5wPxTCBeBsQLgHgREHu4uwJ1M2HFRgy4A

SMeDAUAQzsLUQ==');

Our DTM.


Now all we have to do is find the dtm and click on it


if FindDTM(DTM,x,y,MCX1,MCY1,MCX2,MCY2) then
Mouse(x,y,10,10,True);
Make sure its MC! MC stands for Main Chatbox!
You must use it if you do it like this!


And we're done!

DTM = Much more efficient.




This is really simple to use so go ahead and try it out!

Kyle Undefined

2012-02-29 16:38:12

Nice simple tut, I'd add how to do it with FindText ;)

Sin

2012-02-29 16:42:52

From: Kyle Undefined
Nice simple tut, I'd add how to do it with FindText ;)



Oh! Forgot about this! :o

honeyhoney

2012-04-30 18:13:14

From: Kyle Undefined
Nice simple tut, I'd add how to do it with FindText ;)


Would FindText be faster than a DTM?

Abu

2012-04-30 18:27:25

From: honeyhoney
Would FindText be faster than a DTM?


Depends on the DTM, but generally yes.

Having said that it's not a bad idea to use both as a failsafe.