LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

string to text box

I would like to ask for your help,
namely how to copy and paste a "STRING" into the "text box" marked in red in the picture?

0 Kudos
Message 1 of 7
(709 Views)

Look into the .NET Systems.Windows.Forms.SendKeys.SendWait to do what you want.

0 Kudos
Message 2 of 7
(700 Views)

I don't know your use case, but your example just shows opening a text file with notepad. If that is all you need to do you can use the System Exec.vi.

 

2024-01-03 14_19_07-Untitled 4 Block Diagram _.png

0 Kudos
Message 3 of 7
(649 Views)

yes, it works that way in Notepad, but there is a program in which I can only open a file if I go to open in the menu and select the file there, or if I copy the path there.
with a part of the program, I got to the point where I can maneuver with the mouse cursor to open it, but the access path should be copied here, which would be in a string.
I showed only one example for this, which was Notepad.

0 Kudos
Message 4 of 7
(644 Views)

@Lavezza wrote:

I don't know your use case, but your example just shows opening a text file with notepad. If that is all you need to do you can use the System Exec.vi.

 

2024-01-03 14_19_07-Untitled 4 Block Diagram _.png


I'm not understanding. If Lavezza's solution opens the file as you have it, why do you need to place the text of the file path in the Windows Open Dialog Box?

0 Kudos
Message 5 of 7
(615 Views)

@Eric1977

 

It sounds like the Notepad was just an example. @djcsabii is trying to open a different kind of file with a program that doesn't accept a file as a command line argument. It only opens a file via the File Open dialog.

0 Kudos
Message 6 of 7
(588 Views)

If that is really the case then the solution over the file dialog is very brittle.

 

The user has to open the file dialog first AND make sure the curser is in the file name text box AND not mess with the keyboard and mouse AND …

 

Quite a lot of conditions that all have to be fulfilled perfectly to let this work!

 

Has that application really no command line interface! Or maybe an ActiveX Automation interface, or a .Net interface or a DDE interface or maybe a TCP interface?

Rolf Kalbermatter
My Blog
0 Kudos
Message 7 of 7
(579 Views)