I am currently working in VB.Net console application. I am new to the console application, mostly working in windows forms and sql, and I am trying to write some code to make the mouse click at different spots on the screen at specific times. I have searched the web quite a bit but haven't found anything of much use. Can someone point me in the right direction?
-
You'll have to first move the cursor and then make it click.the_lotus– the_lotus2016-07-22 14:23:25 +00:00Commented Jul 22, 2016 at 14:23
-
@the_lotus So your saying I will need a way to first figure out the coordinates, for example, the first click gives a messagebox displaying coordinates so I know what I need to add to my code?Cheddar– Cheddar2016-07-22 14:24:34 +00:00Commented Jul 22, 2016 at 14:24
-
I don't quite understand. To click the mouse at a specific coordinate, you'll need to call a function to move the cursor at the specific x,y coordinate and then call a function to make a mouse click. If you are looking for a way to find the x, y coordinate you are looking for, then that's a different question.the_lotus– the_lotus2016-07-22 14:26:50 +00:00Commented Jul 22, 2016 at 14:26
-
Well, I mean it is kind of both. I will need to know the X/Y coordinate I need before the initiate the code but there seems to be a lot of information on how to do that so I will figure that out on my own. The part I cant seem to find much on is the forcing of a click somewhere on the screen.Cheddar– Cheddar2016-07-22 14:32:32 +00:00Commented Jul 22, 2016 at 14:32
-
The link I posted tell you how to get the function for GetCursorPos, SetCursorPos, mouse_eventthe_lotus– the_lotus2016-07-22 14:39:35 +00:00Commented Jul 22, 2016 at 14:39
|
Show 1 more comment