LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically generating click on path controls browse button

How can I (programmatically) achieve the effect of clicking on the browse button of a path control (from within another controls (value change) event case)?
Thanks for your time and effort!
0 Kudos
Message 1 of 7
(3,273 Views)
Hai,
 
First try to make ur questions clearly understandable. Break it to short sentences.
 
Let's come to ur query.
 
You can use the GetForgroundWindow function and the GetWindowText function from the user32.dll.
 
Try this out and post if any more help needed.
 
Regards,
Mathan
0 Kudos
Message 2 of 7
(3,265 Views)

Use the "File I/O >> Advanced File Functions >> File Dialog" to select a path and then wire that path, to the "path control" button .

Is it what you need?

0 Kudos
Message 3 of 7
(3,263 Views)

Hi rashid,

like i understand your question you should use the "Value (Signaling)" property. Hope this helps.

Mike

0 Kudos
Message 4 of 7
(3,259 Views)


@Pnt wrote:

Use the "File I/O >> Advanced File Functions >> File Dialog" to select a path and then wire that path, to the "path control" button .

Is it what you need?



Pnt is right (I guess).




Message Edited by TonP on 03-25-2008 12:47 PM
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 5 of 7
(3,254 Views)

Yes, there is no function to programmatically hit the "browse" button and show a file or folder selection dialog according to the PathControl's SelectionMode property. Normally you would expect a callable method for the reference.

Therefore, I wrote a VI that does this as best as it can. Here: Saved for LabVIEW2010.

See http://www.tu-chemnitz.de/~heha/mb-iwp/LabVIEW/path.zip/

Moreover, I wrote another VI that checks whether path given is valid for the current SelectionMode property, and if not, call the file/folder selection dialog.

Some (rarely used) SelectionModes are not handled in this example. The different modes require a quite large case selection list because the file selection dialog box cannot be set-up programmatically.

To save VI size, I choosen the old-style yellow file/folder selection VI, not the blue Express VI.

Message 6 of 7
(2,246 Views)

What is the effect of clicking on the browse-button of a path control? A File-Selection-Dialog or Directory-Selection-Dialog is showing up.

You can achieve this, as mentioned before, with the "File Dialog"- Express-VI or just the execution of Open/Create/Replace File or Read/Write to/from Binary/Text - File with the Initial Path input left unwired.

 

oops, now I see this is a very old thread Smiley Sad

 

Greets, Dave
Message 7 of 7
(2,240 Views)