From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Store string input in a txt file and extract later

Hello Labview Community,

I'm writing af code, which prompts a user to type in a username and password. Later, when the corrent button is pressed, the user is directed to a new tab, at which one has to type in the previous typed username and password.

 

My problem is basically, that my program saves the input of username and password as a string in 1 line in a txt file, whose path I have to chose every time i run the program. I would like to do following improvements, but I have a hard time doing them:

1) How can I just save a certain file path for my input of username and password, so I dont have to choose a path every time i run the program?

2) How do I make my VI read the typed username and password, and compare that to a new input of username and password, in order to execute the rest of the program? My own idea is, that i want to use a simple compare function. But since i have a had time doing 1), then this is difficult. 

I would like to channel the read username and password to the constants at the red arrows:

VI.PNG

3) I have thought about making my VI arrange my input of username and password in columns in the txt file (or just seperated into different lines) which i can read more easily. But i don't know how to read a certain area of a txt file.

I hope you guys can help!

0 Kudos
Message 1 of 2
(2,319 Views)

There is a path input for the write operation. Connect a valid path to it!

 

 

Do a few tutorials, there are many questionable code constructs (unneeded sequence structure, etc.)

Why do you need to loops and two event structures? Unstoppable loops?

 

(It is probably a really bad idea to store name/passwords in clear text.)

0 Kudos
Message 2 of 2
(2,311 Views)