Code: Select all
set the itemDelimiter to numToChar(47)
put the filename of this stack into P --get current location
Delete the last item of P
Put empty into field "Transcription"
answer file "Choose a file:" -- select an audio file to open
set the filename of Player "MovieScreen" to it
put the last item of it into field "MovieTitle"
Put P & "/DataFiles/" & field "MovieTitle" & ".txt" into TheFileName
-- creates a text file name with the same name as the audio file
open file TheFileName
open file TheFileName for read
read from file TheFileName at 1 until EOF
put it into field "Transcription"
close file TheFileName
There are no error statements produced.
Does anyone see what is going on here? Thanks.