![]() |
![]() ![]() ![]() ![]() ![]()
|
next newest topic | next oldest topic |
Author | Topic: Fill an array w/ file dialogue |
metalbox Member |
![]() ![]() ![]() Hi. How could I fill an array with filenames by selecting a folder thru a dialogue box ? Rather than one file at a time. I'd like to use this for auditioning my control structures, and access the 'filenames' in scripting. Thanks, Michael IP: Logged |
SSC Administrator |
![]() ![]() ![]() The following code snippet will give you a collection of file names (strings with the full path to each file) found in same directory as the sample file that you have selected with the dialog box. You would ordinarily use this in a script to make a series of Sounds, each with one of these file names substituted into the Sample or Wavetable field of a Sound. =================================================== | anyFile fileList sampleFiles | anyFile := HostDriverInterface getFileWithPrompt: 'Please choose a file in the directory of interest' fileTypes: HostDriverInterface sampleFileTypes ifCancel: [^ self abortForKyma]. fileList := anyFile fileNamesInSameDirectory. sampleFiles := fileList select: [ :fileName | HostDriverInterface filenameIsSampleFile: fileName asFile]. [This message has been edited by SSC (edited 12 May 2002).] IP: Logged |
metalbox Member |
![]() ![]() ![]() Thanks ! IP: Logged |
All times are CT (US) | next newest topic | next oldest topic |
![]() ![]() |
This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.