Search processing.org:

Reference for Processing version 1.0+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.

Name

### selectInput()

Examples

    String loadPath = selectInput();  // Opens file chooser
    if (loadPath == null) {
      // If a file was not selected
      println("No file was selected...");
    } else {
      // If a file was selected, print path to file
      println(loadPath);
    }

Description | Opens a platform-specific file chooser dialog to select a file for input. This function returns the full path to the selected file as a String, or null if no selection.

Syntax

    selectInput()
    selectInput(prompt)

Parameters

prompt | String: message you want the user to see in the file chooser

Returns | String or null
Usage | Application
Related | selectOutput() selectFolder()

Updated on November 22, 2008 08:39:26pm PST