01-03-2024 12:06 PM
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?
01-03-2024 12:11 PM
Look into the .NET Systems.Windows.Forms.SendKeys.SendWait to do what you want.
01-03-2024 01:24 PM
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.
01-03-2024 01:37 PM
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.
01-03-2024 02:58 PM
@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.
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?
01-03-2024 05:08 PM
@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.
01-03-2024 05:35 PM
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?