############################################################ # # name: openlist_specificitem.psc # # description: This script searches on the code of the item, # which is the third field in the name, and consists of # either two or three characters, starting from the 6th # character. # # last change: 28-09-04 # # by: Bert Remijsen # ############################################################ form Read list word location C:\bert\confs\2004_leipzig\testdata1 comment filenaam (zonder extensie .txt) text listfile testlist1 comment open all items coded: word item 23 comment Choose object types boolean aiff 1 boolean TextGrid 0 endform Read Strings from raw text file... 'location$'\'listfile$'.txt laatste = Get number of strings for fileteller from 1 to 'laatste' select Strings 'listfile$' stringx$ = Get string... 'fileteller' test$ = mid$ (stringx$, 8, 1) if (test$ = "_") check$ = mid$ (stringx$, 6, 2) else check$ = mid$ (stringx$, 6, 3) endif if (check$ = item$) if ('aiff' = 1) Read from file... 'location$'\'stringx$'.aiff endif if ('TextGrid' = 1) Read from file... 'location$'\'stringx$'.TextGrid endif endif endfor select Strings 'listfile$' Remove