Output from RR
Francesco from Italy  [20 posts]
11 year
Hi to everybody, I am new of the forum and I have just begun to use RR and I am not practical of planning.
Your forum is a lot me of help.

I would want to know  under which it forms rr it sends his  output to the pc, and as I can do to use for command an instrument of it.

For example, my situation : RR compares an image or form captured by the webcam in real time with that to which I want that she correspond. If condition is correct then I want to close a contact for an instant (pulsating) and then RR it continues its job.

I am sorry for my English that is not correct.
I hope that someone can be me of help, and that this maid also to others.
Francesco from Italy  [20 posts] 11 year
Certainly my question is stupid, but I would want to begin with a what simple to understand better the operation of RR.

I.e. : i would be thankful if someone could tell me as to do after I have recognized an image with the module "Object Recognition" to send for i.e to the mouse the order to click in a certain potion of the screen.

If someone was able post the code i have like.

Steven Gentner from United States  [1446 posts] 11 year

As everyones project is a little different we don't have code for exactly what you want to do. But you should start with:

1. Get the OR module to recognize the object correctly. This is actually the harder part. Be sure to test in an environment as close as possible to what you will be using and during different times of the day (to ensure different lighting conditions do not cause a problem).

2. Once that is done, you can use the Mouse module to provide a click into a different application. You have to be careful of the setup of this as a slight change to the layout on the screen would cause it to break. I would use the X and Y boxes to position the mouse over the correct button and then assign (like the in the interface screenshot of the Mouse module) a variable that would be assigned the value "Left_Click" when the object is found.

To make things easier, you could name the object template as LEFT_CLICK.jpg and then just type in the OBJECT_NAME into the mouse button variable. When the object becomes visible it will cause that variable to be populated with the name of the recognized template or LEFT_CLICK which will then cause the mouse module to simulate a click.

See how far you can get and post what you have here and we can help further.

Francesco from Italy  [20 posts] 11 year
Thanks for your answer.
I have perfectly performed the point 1) .
Unfortunately I have had some problems with the form "Mouse", that is I don't know, whether to insert in the 2 fields: "X Coordinate" and "Y Coordinate", and then in the fields to the right I cannot insert the coordinates because they are grey. Then the field "Button Status" and "Scroll" they must be empty?
Obviously I must declare a variable and to assign her value "Left_Click."

I am sorry that I have not understood well any points, because I am a little practical of planning.

I thank you for your availability.
Steven Gentner from United States  [1446 posts] 11 year

If you have #1 working then you can type in the coordinates that the mouse should be at in the X Coordinate and Y Coordinate dropdown. Yes, there are variables listed in that dropdown but you can also just type in number and wait for a couple seconds and the mouse will suddenly move to that location. If you move the mouse manually to the right location you can determine what those numbers need to be.

See if you can get that to work and we can move onto creating a variable that will be placed in the Button Status part of the mouse interface.

Francesco from Italy  [20 posts] 11 year
I premise that with your helps I have made progress and I have understood different things, but for now I am still in phase of test.
The fomodule O.R. it works very well, I don't have problems of illumination and the images they are well visible.

My job is that to recognize some labels that flow in succession.

A labels it contains 2 simple images/shape ("A" and "B").
I have 2 files ("A1" and "B1") that contain two images/shape that i wants to match.

The conditions for the action of the left_clic are :

1) ("A") = ("A1")


2) ("B") <> ("B1")

Then left_clic (action)


However I have tried to make a test with one only image, but when I stop the webcam on the image, the mouse it continually clicks.

At least I would want to resolve this problem. (I attach the file.robo)

I am waiting for one kind answer of yours.
Anonymous 11 year
As I have not had still answered, I add a simple question. When use the module O.R. and the cam it recognizes me the object, his value where is memorized ? in some variable ? and with that name ? what is it that is increased ?
Because, as I have written to the post than above, I don't succeed in completing the test :  "finds object and mouse click an only time"
I in advance thank as always.
Steven Gentner from United States  [1446 posts] 11 year
The name of the recognized object is place in the OBJECT_NAME variable. Thus if you use LEFT_CLICK as the name of the object instead of A1 or B1 then the mouse will get the message "LEFT_CLICK" through the variable named OBJECT_NAME (as per your robofile) and thus will execute a left click. This is already configured in your robofile .. you just need to change the template filename (ie. A1.jpg to LEFT_CLICK.jpg).

Start with one object first to keep things simple ... once you have things working and understand how it works you can extend that to two.

Francesco from Italy  [20 posts] 11 year
I start with one object first to keep things simple, and in according to your info, i have changed the template filename in LEFT_CLICK.

Unfortunately up to that the object it is firm before the cam (ie. 2 seconds), for the all the time, the mouse continually execute a left click. How i can do for execute "1 only" click and to stop it, up to that the following image doesn't recognized ? Is perhaps a Roborealm software problem ?

This thing has brought out me road and therefore i have also been a few insistent in the questions.

I attach the file .robo adjourned with which I have the problem.

Thanks always to be available to answer.
Francesco from Italy  [20 posts] 11 year
Francesco from Italy  [20 posts] 11 year
I understand that the questions to which you must answer are a lot of, but, I would want to arrive to a concrete conclusion of my problem, also to proceed to the purchase of the program.

In the meantime that I wait for the answer to my preceding question, I send you a.robo file, done in different way, and, if possible, I would want to know where I have been wrong, and to be suggested the correct way. Because, with this file the mouse pointer moves him, in automatic, but the click doesn't happen. The saved image I have called her "template."

(The module VbScript is very interesting, and therefore, here is the motive for which I have done in this way; I would want to understand more around)

Another thing that I wonder me is: the Defaults VARIABLES of RR must be declared ?

I hope to have as soon as possible an answer.
I am looking for in all the ways to find alone the solution, also reading various notes of VbScript.
Thanks to everybody.
Steven Gentner from United States  [1446 posts] 11 year
The saved image I have called her "template."

No, call her "Left_Click"

Sorry, I will be very short to ensure that you understand the instructions.

Francesco from Italy  [20 posts] 11 year
It is not a problem if you have been short, it is important that you are always kind to answer.

I have called "Left_Click" the saved image, and I have made 3 tests, of which I attach you the files .robo, that the followings have given results negative :

1) the image is recognized, but nothing doesn't happen

2) the image is recognized, and the mouse makes click continually, up to that the image recognized is out of the sight of the cam.

3) the image is recognized, the mouse goes to the coorinates that I have written in to the Mouse Module, but it doesn't make Click.

I will keep on making some tests, unfortunately, I am going crazy for a simple thing.

I hope that you can still help me to resolve the problem. Thanks.
Francesco from Italy  [20 posts] 11 year
I attach again the file 1) .robo where I have modified in the pipeline to the istruction "if" the name of value in Left_Click. But the result it is the same of that above to the point 1.

Francesco from Italy  [20 posts] 11 year
Thanking to be always you available, I want to communicate you that my problem I have resolved using your suggestion, but also with the module " if_statement."
It didn't work, because even if the software seems to work in everything, in reality it jams. In fact if I restart the software RR and I reload the same file.robo, everything works well.

The only problem that stays is that for the whole time that the image is visible from the cam, the mouse it continually clicks. I have inserted in the pipeline a timer, so that to wait for the time that arrives the following image. Even if I would have preferred a different solution.
If you have a suggestion it is pleasant.

Thanks for your help with which I have succeeded in making progress in the use of the software RR.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index