$msfile

From Scriptwiki
Jump to: navigation, search

Displays the multiple-file selection dialog.

$msfile(dir [,title] [,oktext])
  • Dir is the directory to start in.
  • Title is the title of the selection dialog.
  • oktext is the text to display on the "OK" or "Select" button.
  • Returns: The number of files selected, or -1 if too many were selected.
$msfile(N)
  • Returns the Nth selected file, or if N=0, the number of selected files. Refers to the last use of $msfile

Example

This will echo all selected files on their own line.

alias selectfiles {
 var %fileCount = $msfile($mircdir,Select any files you wish to echo,Echo)
 var %i = 1
 if (%filecount == 0) echo -atg No files selected
 elseif (%filecount < 0) echo -atg Too many files selected
 else {
   while (%i <= %filecount) {
     echo -atg File %i of $msfile(0) $+ : $msfile(%i)
     inc %i
   }
 }
}


See Also