CFileDlg:Start


The Start method begins iteration over the list of file names returned by the Open method.

Syntax

CFileDlg:Start()

bullet.gif    This method has no parameters or return value.

Remarks

This method initializes the iteration for fetching the file names selected in the Open dialog. Use the Next method to return each of the successive file names.

Example

The following example uses Start to initialize a loop over files returned by the Open method:

F = new_filedlg()

-- create a CFileDlg object, F 

F.bSetMaxFiles = true

-- set the flag for selecting more than 1 file

F.nMaxFiles = 100

-- allow selecting up to 100 files

sName, bSuccess = F:Open()

-- get a file name

FileName = {}

-- create a table to hold the file names

n = 1

-- setup an index counter

F:Start()

-- initialize the file name iteration

while true do

-- loop until a nil file name is returned

  str = F:Next()

-- save the next file name

  if str == nil then break end

-- exit the loop when a nil file name is returned

  FileName[n] = str

-- save the file name in the table

  n = n + 1

-- increment the table index

end

 

-- next statement following the loop

 

Related Topics

CFileDlg class, Open, Next


Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics, Inc. All Rights Reserved.