I cannot seem to write an array into a file and then read it back into an array.
This is my code for saving the array which works because in notepad I see the data.
Code: Select all
-------------------------
// Encode Aray with language data with arrayEncode function to convert an array into a string and save file
put field "ApplicationName" into Array_LangFile["application"]
open file tFile for write
write arrayEncode(Array_LangFile) to file tFile
close file tFile
// end make file
-------------------------
Code: Select all
// Read data from file tFile
-------------------------
read from file tFile until EOF
if it is empty
then
answer "There is no data in this file!"
close file tFile
exit mouseUp
end if
put it into tEncodedArray
close file tFile
put arrayDecode(tEncodedArray) into Array_LangFile
put Array_LangFile["application"] into tApplicationName
-----------------------