I have a big problem with reading a text file, which i copied in standalone application settings. What i need to do is putting the file content into a field, but what i get is an empty result or "can't open that file". Here is what i have tried.
Code: Select all
on mouseUp
put specialfolderpath("engine") into tPath
set the itemdel to "/"
delete item -1 of tPath
put tPath & "/page_1.txt" into file1
set the text of field "taleText" to URL( "file:" & file1)
end mouseUp
Code: Select all
on mouseUp
put specialFolderPath("engine") into tMainPath
set itemdel to "/"
delete last item of tMainPath
put tMainPath & "/page_1.txt" into tURL
open file tURL for read
read from file tURL until EOF
put it into tText
put textDecode(tText,"UTF-8") into field "taleText"
close file tURL
end mouseUp
I have been searching answers in the forum but i could not find any that could help me Hope i will find my answer here.
Thanks