form Enter directory and search string
   text openpath 请在此输入文件夹地址\
endform

Create Strings as file list... fileList 'openpath$'*.wav
numberOfFiles=Get number of strings
for ifile from 1 to numberOfFiles
	select Strings fileList
	fileName$=Get string... 'ifile'
		simpleName$=fileName$-".wav"

	Read from file... 'fileName$'
	To TextGrid... sentence
	select all
	minus Strings fileList
	View & Edit
	select Sound 'simpleName$'
	To Pitch... 0.0 75.0 600
	View & Edit
	pause 开始手动标注
	select TextGrid 'simpleName$'
	Write to text file... 'openpath$''simpleName$'.TextGrid
	select Pitch 'simpleName$'
	Write to text file... 'openpath$''simpleName$'.Pitch
	select all
	minus Strings fileList
	Remove
endfor
exit 所有文件处理完毕！

#Qibin Ran
#2018-12-09