Skip to main content

Is there a way to simulate a mouse left button click in a program. So that I can act as if the mouse left button was clicked however no interaction from the user?

Is there a way to simulate a mouse left button click in a program. So that I can act as if the mouse left button was clicked however no interaction from the user?

the only idea i have is to use the Mouse Exception (In Manual 7.3.1 Descriped) and then use W$KEYBUF to simulate the input.


Is there a way to simulate a mouse left button click in a program. So that I can act as if the mouse left button was clicked however no interaction from the user?

Can you describe what you are trying to achieve? Are you trying to place focus on a certain area, or a tool tip?


Is there a way to simulate a mouse left button click in a program. So that I can act as if the mouse left button was clicked however no interaction from the user?

If there is some bit of logic you intend to execute that executes in response to a mouse-click, why not simply call that logic?


Is there a way to simulate a mouse left button click in a program. So that I can act as if the mouse left button was clicked however no interaction from the user?

Trying to force a grid sort on a particular column. After loading the grid I am placing the mouse pointer on the column header. I then want to force a mouse click for the grid to sort on that particular column.

We keep track of a user's preference for which column they want sorted for our lookup lists. Then when list is loaded I want to sort by the column they prefer


Is there a way to simulate a mouse left button click in a program. So that I can act as if the mouse left button was clicked however no interaction from the user?

You're going about it the wrong way.  Instead of loading the grid, then calling the sort, sort the data before you load it into the grid.


Is there a way to simulate a mouse left button click in a program. So that I can act as if the mouse left button was clicked however no interaction from the user?

problem is the column is not a key so I can't load the grid  sorted


Is there a way to simulate a mouse left button click in a program. So that I can act as if the mouse left button was clicked however no interaction from the user?

Hello,

tested alot with vbscript and so on... but no result.

The only way to get it working was to build a "Click Left Mouse EXE" with AutoIT.

www.autoitscript.com/.../downloads

The OutoIT Script is very simple:

---------------

#include <AutoItConstants.au3>

; click at the current mouse position.

MouseClick($MOUSE_CLICK_LEFT)

---------------

compiled it to an exe...

then call it in cobol:

          call "c$system" using "c:\\muffrohr\\LMouse.exe", 97 end-call.

I only tested the sorting... by placing the mouse manual to the header of the cell in a grid and then press <F1> to call the exe. After i pressed <F1> the sorting in the grid happens.


Is there a way to simulate a mouse left button click in a program. So that I can act as if the mouse left button was clicked however no interaction from the user?

Thanks I'll look into that


Is there a way to simulate a mouse left button click in a program. So that I can act as if the mouse left button was clicked however no interaction from the user?

Thanks all for your help


Is there a way to simulate a mouse left button click in a program. So that I can act as if the mouse left button was clicked however no interaction from the user?

Don't know how many rows are in the grid, but could you sort it 3 different ways into 3 different arrays and depending on which column they click, display the appropriate sorted array?  


Is there a way to simulate a mouse left button click in a program. So that I can act as if the mouse left button was clicked however no interaction from the user?

you can inquire the max rows...

inquire sample-grid, last-row = max-rows.

give only a little problem, when in the first row sometimes no value is... you get the wrong last-row value back.

Sort in Grid is Possible since Version 9.2.

You have to define which columns are sortable, and when the header of the column is clicked the grid get sorted.

Look in the manual for "sort-types"