Difference between revisions of "$msfile"

From Scriptwiki
Jump to: navigation, search
 
m (See also)
Line 26: Line 26:
 
   }
 
   }
 
  }
 
  }
 +
 +
 +
==See Also==
 +
[[$msfile]] [[$sdir]]
  
 
[[Category:File and Directory Identifiers]]
 
[[Category:File and Directory Identifiers]]

Revision as of 21:31, 11 May 2008

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

$msfile $sdir