Hello,
these are my first, very noobish steps to build my own script, mostly by copying or at least looking at parts of other scripts. I know there are a buttload of tutorials and tips around here and I didn't go through them all, but I hope that some of you will be kind enough to at least push me in the right direction; you can link me to tutorials or videos all you want, but please bear with me a little.
So I want to make a simple script that walks from a to b. Using SPS and the path generation program available it works (more or less), until to a point where a gate needs to be opened.
Trouble is the gate might not always be visible, the procedure needs to do the following:
a) - Check if it finds the color of the gate on the screen, if yes, continue to the next step
- If not, rotate the screen to a certain degree, then repeat the process.
"If... then... else" is the kind of loop I need for something like this, right?
b) - Click on the gate, opening the context menu
- Read the options. If one says "Open Gate" then it has found the right object.
If not: Back to a)
- Click on the "Open Gate" option and end the procedure.
Now I have some issues with this whole business, especially when it comes to two points:
1. Which function do I need to use to get the whole color detection working?
An AIO Powerminer from the public scripts section has something that looks as if it could be the solution:
This video gives some information on how to use color functions, unfortunately it's only for "FindColor".Code:If FindObjCustom(x, y, ['ne Co'], [2895406, 2105633], 3) Then...
What are all these parameters? The SRL documentation doesn't really explain it. Also, am I on the right way or are these functions not made for what I want to do?
2. Does Simba/SRL even have an OCR module for reading the options of a context menu? It surely seems to have a few OCR functions (btw. what is "uptext"?).
Alright, as I said all these questions are not really sofisticated, but I surely hope that somebody might at least show me a map of this whole jungle of functions, options and whatnot
Thanks a lot!



Reply With Quote










