LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to find the key commands for mouse clicks on another windows program

Spy++ can tell you the bottom position & size, and your window position, size.  You can calculate the button position related to the window.
You know the window position since you are going to move it.
 
By the way, you can't use System Exec.vi to call a Windows API.  Take a look those NI VIs in lvwutil32, see how those VIs call Windows APIs.
 
George Zou
 
George Zou
Message 11 of 23
(2,111 Views)
Hi George, thank you for your help.  I finally got things worked. I wrote a little labview code calling a windows API to find cursor position and manually mapped out the positions of interest. I wish I can do this automatically then a different application can be programmed without going through this manual process.  Anyway, things are getting better than yesterday. Many thanks to you and others who reponded.
 
Have a great weekend,
Bryan
0 Kudos
Message 12 of 23
(2,107 Views)

Bryan:

You could also use VIs from the Input Device palette in LabVIEW to find out the position of your mouse. Check the attached screenshots of a front panel and block diagram to see what I am talking about.

Thanks,

Rudi N.

Message Edited by Rudi N on 04-09-2007 04:56 PM

Download All
Message 13 of 23
(2,087 Views)
Hi Rudi, thank you for posting your vi pictures. Will this find the mouse clicks on another applications window? That will be great since my current vi only show position if click on its own front panel. I had to do a manual overlap of positions. I got into some other issues, and will need to try your method a little later. Thanks again.
0 Kudos
Message 14 of 23
(2,082 Views)


@BryanL wrote:
Will this find the mouse clicks on another applications window?


Hi Bryan,

U can try it out yourself, instead of asking everyting... Smiley Wink

It works for any click & any mvement on any window, both for LabVIEW and other than LabVIEW too.

See the attached VI in LV 7.1 for further info.

- Partha ( CLD until Oct 2027 🙂 )
Message 15 of 23
(2,065 Views)

U can find & configure Key pressings like in the VI attached. It workf for keys pressed from any other open application also.

Sorry for attaching seperately, was working mid-way while attaching earlier.

Ignore my previous attachment & use this one.

- Partha ( CLD until Oct 2027 🙂 )
Message 16 of 23
(2,063 Views)

Sorry, attachment problem... Smiley Sad

Here it is.

- Partha ( CLD until Oct 2027 🙂 )
Message 17 of 23
(2,063 Views)

Hi Partha,

Thanks so much for the vi. It worked beautifully, as mentioned I got caught into multiple tasks and didnt get to try Rudi's approach. Thank you and Rudi for your kind suggestions.  So far I have automated three different stand alone applications successfully with LV on my desktop, except one that will cause a problem in my lab station that only have LV run time engine.  The problem is I cannot get the content of a folder.  I can get the folder location such as C:\MyDir\MySubDir enterred in the menu. By following a Tab command I should have that folder's content show up in a list box. It worked mannually but not on the PC with run time engine.

Thank again.

0 Kudos
Message 18 of 23
(2,054 Views)

Partha:

I am glad to hear that part of your problem is resolving. Regarding not being able to list the folder content, there is "List Folder.vi" in LabVIEW that you can use to populate the content of a folder. If I misunderstood your question, please post your code so that I can get a better understanding about what you are trying to achieve.

Thanks,

Rudi N.

0 Kudos
Message 19 of 23
(2,031 Views)

Rudi,

It was Bryan who asked the way to get the folder contents.

Not me... ! Smiley Wink

- Partha ( CLD until Oct 2027 🙂 )
Message 20 of 23
(2,026 Views)