12-16-2011 09:42 PM - edited 12-16-2011 09:49 PM
Hi, I am looking on how to receive the x/y coordinates when a user selects a point on an image. The code that I've come up with so far works, but not to my requirements. The code attached below, pops up a window and the user selects the point, then the coordinates are displayed. This causes two problems, it is not continuous. What I mean by that, is that I wish to allow the user to keep clicking on random points of the image and have the coordinates displayed. Also, I do not wish to have a popup window, the user would select the points right on top of the image on the front panel. Please let me know if you can think of a way to do this.
The other image displayed below is for reference. I wish to have parts of the image arranged in some sort of pattern for the user to select.
Thank you!
12-17-2011 07:53 AM
Hi Robot,
Check this. Is this you want?
12-17-2011 12:00 PM
@sac. wrote:
Hi Robot,
Check this. Is this you want?
Hi SaC,
Thank you! It is very very close... all I need would be for the user's mouse click to activate the x/y points to be used. I revised your code to show that I'll be using the x/y points to run different cases. Right now, I just used the x coordinate for an example. However, I would only like these cases to be run if the mouse has been clicked. I tried using the Activate Mouse and Aquire Input Data VIs, but they only return the x/y points from the whole monitor, not just over the image. Any ideas?
12-17-2011 12:37 PM
@R0B0T wrote:
@sac. wrote:
Hi Robot,
Check this. Is this you want?
Hi SaC,
Thank you! It is very very close... all I need would be for the user's mouse click to activate the x/y points to be used. I revised your code to show that I'll be using the x/y points to run different cases. Right now, I just used the x coordinate for an example. However, I would only like these cases to be run if the mouse has been clicked. I tried using the Activate Mouse and Aquire Input Data VIs, but they only return the x/y points from the whole monitor, not just over the image. Any ideas?
Actually, I found a way to have LV do what I want. I experimented around with the Activate Mouse and Aquire Input Data VIs. Check it out and let me know if you think this is a good way of doing it.
12-17-2011 09:51 PM
Hey robot,
This might be a good idea of doing.Try to avoid red dots in divide function replacing with quotient and remainder function. Post your final code so that can help you much better.