clearinfo form Please fill in... comment Please state the directory of your files you want to analyse sentence directory endform Create Strings as file list: "list", directory$ + "/*.wav" nr_of_strings = Get number of strings for i from 1 to nr_of_strings selectObject: "Strings list" string_name$ = Get string: i Read from file: string_name$ name$ = selected$ ("Sound") To TextGrid: "Sounds", "" selectObject: "Sound " + name$ plusObject: "TextGrid " + name$ Edit #editor: "TextGrid " + name$ pause You now have time to edit your TextGrid. Click 'Continue' to proceed with the next file. Close selectObject: "TextGrid " + name$ textGrid$ = name$ + ".TextGrid" if fileReadable (textGrid$) # Option 1 #pause Attention. The file already exists. Click 'Continue' to choose a new name. #new_name$ = chooseWriteFile$ ("Save as a WAV file", directory$ + ".TextGrid") #if new_name$ <> "" # Save as text file: new_name$ # appendInfoLine: "The TextGrid has been saved." #endif # Option 2 beginPause: "Attention" comment: "The file " + textGrid$ + " already exists. Choose a new name below" sentence: "new name", ".TextGrid" endPause: "Continue", 1 if new_name$ <> "" Save as text file: new_name$ appendInfoLine: "The TextGrid has been saved." endif else Save as text file: directory$ + textGrid$ appendInfoLine: "The TextGrid has been saved." selectObject: "Sound " + name$ plusObject: "TextGrid " + name$ Remove endif endfor select Strings list Remove