Filtering Files Using 'answer file with type'

Now we will use the file extension we just created to create a Filter for 'answer file with type'.

In the message box paste the following:

put glxapp_fileTypeFilterFromExtension("Text Files") into theFilter

answer file "select text file" with type theFilter

Press the Enter key to execute the RevTalk code.

A Dialog Appears

A file selection dialog appears that only allows you to select files with a .txt extension.

The glxapp_fileTypeFilterFromExtension call returned the string:

Text Files|txt|

This string tells 'answer file with type' to only allow text files. For more information on handlers that help you to work with files see the API documentation for Files.

0 Comments

Add your comment

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.