$msfile: Difference between revisions

From Scriptwiki
Jump to navigation Jump to search
Aca20031 (talk | contribs)
m See also
Aca20031 (talk | contribs)
mNo edit summary
 
Line 29: Line 29:


==See Also==
==See Also==
[[$msfile]] [[$sdir]]
* [[$sfile]]
* [[$sdir]]


[[Category:File and Directory Identifiers]]
[[Category:File and Directory Identifiers]]

Latest revision as of 00:41, 8 August 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