Live updating Text field. help needed

I’m currently working on a AppleScript app through XCode, and have come across a issue that I’m stuck on.

I need to set the contents of a text field to contents of a log file which is easily done but the issue i’m having is that I want the text to be live updating so as the info is written to the log it appears live in the text field.

Any Ideas?

As long as the log file is being updated by the same application that has the window with the text field, you can simply write a short handler that manages the updating of the text field:

to UpDateTextField()
–set LogFile to read the log file
set content of text field “xxx” of window “yyy” to LogFile
end UpDateTextField

Whenever you need to write to the text field (including at startup), you simply call the handler, it reads the file, and writes the field. You call it again whenever your application finishes writing the log file.