Hi Guys,
In my program I have two separate Dialog boxes,
1st Dialog box will ask user to input some string and store the info using WriteLn to store into a text file01.
2nd Dialog (memo) box will use ReadFile to read the contents from text file01.
Unfortunately, the file contents cannot be displayed on the MEMO box. If I create a new text file and input some string and without attempting to use "WriteLn" command, the 2nd dialog (Memo) box is able to Read the file contents.
I'd narrowed down the issue to the possibility that "WriteLn" is still accessing that text file01. Therefore ReadFile will have issue reading the contents. Is there any way to kill the WriteLn process or gracefully close the file01 process after strings are written into file01?
Dialog unable to read from file
Moderators: Dorian (MJT support), JRL
Re: Dialog unable to read from file
Without seeing your code I can't even speculate why you can't read the file data. Since Writeln> closes the file immediately after it finishes writing the data, I doubt the file is in use.
If the two dialogs are in the same script, there is no need to write and read to a file. Just set a variable to the data typed into dialog 1 then add that to the memo box of dialog 2.
If the two dialogs are in separate scripts, you could use the technique I've outlined HERE where you use GetControlText or SetControlText to pass data between fields in separate dialog boxes in separate scripts. Again, no file or clipboard needed.
If the two dialogs are in the same script, there is no need to write and read to a file. Just set a variable to the data typed into dialog 1 then add that to the memo box of dialog 2.
If the two dialogs are in separate scripts, you could use the technique I've outlined HERE where you use GetControlText or SetControlText to pass data between fields in separate dialog boxes in separate scripts. Again, no file or clipboard needed.