10-07-2013 02:36 PM
I have been given a CVI application that includes a panel with a tree control section. The task I have at hand is to try and automate the current software application to exclude manual mouse use. Is there anyway to interface to a 'tree' using a soft approach and not using the mouse?
Solved! Go to Solution.
10-07-2013 03:21 PM
I am not sure what you mean by automating a tree control, but... you can operate a tree control with the keyboard (there is a help section called Operating Tree Controls) and via software, i.e. programmatically, have a look at the functions SetCtrlVal and SetCtrlAttribute
10-08-2013 07:46 AM
Generally this application is controlled manually using a mouse. I am looking to control it without mouse/keyboard entry and mainly be software. I was looking for
a way to take a folder in a tree control and expand it to reveal the contents of that folder and then I need to select a script file within that folder. The only info I
have is the constant name assigned to the 'Tree Control'.
10-08-2013 08:30 AM - edited 10-08-2013 08:31 AM
If you want to operate on the tree control programmatically you can use functions included in this page; to expand or collapse a tree branch for example you can:
But I have an impression that your concept of automating the program is the ability to operate on the program from another application acting as if it were the user. If this is true, I'm afraid there is no possibility to do so, as CVI control are not standard windows controls (e.g. you cannot obtain their system handle).
10-08-2013 08:50 AM
Thanks for your input. I am operating on the tree from a newly created module in the application, trying to leave the existing application software in tact. I will
look over the page 'Programing with Tree Controls' as pointed out.Unfortunate for me, I have not had the course for CVI and am basically finding my way through
by trial and error.
10-08-2013 09:58 AM
In this case, going through the examples CVI provides on tree controls can be a good source of ideas and programming tips. You can find several of them in samples\userint folder: I suggest you look at tree search that shows how to locate tree items; the other examples are very specific for features you probably don't need at this moment, but indeed can be worth viewed.