Reference for Processing version 1.2. If you have a previous version, use the reference included with your software. If you see any errors or have suggestions, please let us know. If you prefer a more technical reference, visit the Processing Javadoc.

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 June 14, 2010 12:05:29pm EDT

Creative Commons License