PLUG'N SCRIPT
rapid plugin development
Tutorial
DSP
KUIML
How-to
Scripts
  • Overview
  • Tutorial
  • Reference
Layout and positioning
  • CELL
  • TABLE
Language basics
  • SKIN
  • DUMMY
  • INCLUDE
  • INCLUDE_ONCE
  • DEFINE
  • UNDEFINE
  • VARIABLE
  • LOCAL_VARIABLE
  • TEMPLATE
  • TEMPLATE_INNER_CONTENT
  • TEMPLATE_UNLOAD
  • REPEAT
Text widgets
  • TEXT
  • TEXT_FIELD
  • TEXT_EDIT_BOX
  • TOOLTIP
  • PARAM_TEXT
  • PARAM_TEXT_CONTROL
  • PARAM_TEXT_EDIT_BOX
  • PARAM_TOOLTIP
Image widgets
  • IMAGE
  • IMAGE_ACTION_BUTTON
  • IMAGE_GROUP_BOX
  • IMAGE_PARAM_BUTTON
  • IMAGE_PARAM_KNOB
  • IMAGE_PARAM_LINEAR_METER
  • IMAGE_PARAM_MENU_BUTTON
  • IMAGE_PARAM_METER
  • IMAGE_PARAM_SLIDER
  • IMAGE_PARAM_TOGGLE_SWITCH
  • XYZ_IMAGE_PARAM_JOYSTICK
Invisible controls
  • INVISIBLE_ACTION_BUTTON
  • INVISIBLE_PARAM_BUTTON
  • INVISIBLE_PARAM_KNOB
  • INVISIBLE_PARAM_MENU_BUTTON
  • INVISIBLE_PARAM_SLIDER
  • INVISIBLE_PARAM_TOGGLE_SWITCH
  • XY_PARAM_PAD
  • XY_ZOOM_SELECT_PAD
  • XYZ_PARAM_SCRATCH_PAD
  • XYZ_PARAM_CLICK_PAD
Drawing, curves & 3D
  • CANVAS
    • Graphics API
  • svg
  • CURVE_GRAPH
  • XY_CURVES_GRAPH
  • GRID
  • RULER
  • COLOR_SCALE
  • VIEW_3D
  • COLOR_SURFACE_3D
  • GRID_3D
  • GL_OBJECT_3D
    • OpenGL Cheat Sheet
  • SURFACE_COLORMAP_2DPLOT
Miscellaneous
  • SCRIPT
  • WIDGET
  • KUIML_WIDGET
  • POPUP_MENU
  • MENU_ITEM
  • MENU_SEPARATOR
  • FILE_SELECT_MENU
  • SYSTEM_ACTION_BUTTON
  • SYSTEM_PARAM_CHECKBOX
  • SYSTEM_PARAM_DROPDOWN_LIST
  • WINDOW
  • LOAD_FONT
Data model
  • STRING
  • PARAM
  • FORMULA_PARAM
  • PARAM_ANIMATOR
  • ACTION
    • Built-in action types
  • TIMER
  • ACTION_TRIGGER
  • CURVE
  • FORMULA_CURVE
  • CURVE_FROM_PARAM_OVER_TIME
  • SURFACE
  • FORMULA_SURFACE
  • SURFACE_FROM_CURVE_OVER_TIME
  • GROUP
Links and commands
  • PARAM_LINK
  • PARAM_MULTI_LINK
  • PARAM_CONNECTION
  • PARAM_TO_STRING_LINK
  • STRING_LINK
  • STRING_MULTI_LINK
  • CURVE_LINK
  • CURVE_MULTI_LINK
  • SURFACE_LINK
  • REQUIRED_OBJECTS
  • EXPOSED_OBJECTS
  • PERSISTENT_OBJECTS
Common attrubutes
  • For all elements
  • Widgets
  • Param Widgets
  • Param Controls
  • Param Info Viewers
  • Text Widgets
  • Surface Viewers
  • Curve Viewers
  • Images
  • 3D Objects
Additional information
  • All attributes
  • Attribute types
  • Cursors
  • Math formulas
  • Scripting
    • Built-in addons
  • User experience
  • Errors and solutions
  • Built-in variables
  • Runtime model
  • Parameters mapping
  • Script converter
  • LetiMix
KUIMLReferenceFILE_SELECT_MENU
August 23, 2025

FILE_SELECT_MENU

Creates a menu composed of selectable file names from a list of directories and subdirectories. Can be instantiated alone or within a POPUP_MENU or MENU_ITEM. The menu can store the selected file path and name into a string, and also exposes a read/write index parameter to set or get the selected item number in the flattened files list.

If the file path is set programmatically, the corresponding menu item is automatically selected (if found) and the index parameter is updated.

Attributes brief detailed show all inherited

Name DescriptionDefault
directoriesList of directories to scan for files, separated by ';'empty
file_typesList of file extensions in wildcard syntax, separated by ';'Example: *.txt;*.wavempty
scan_on_loadWhen true, the menu is filled when createdSet this attribute to false if you want to avoid the engine to scan the file system when loading the skintrue
root_pathList of root directories that can be used to store relative file paths, separated by ';'If the directories are located within one of the root paths, corresponding file paths will be stored relatively to one of the root paths. This is useful when the root location of the files may change (Mac vs Windows, or username dependent paths etc.)empty
file_path_string_idIdentifier of the target string to store the selected file path (optional)The stored file path is releative to on of the paths specified in the root_path attributeempty
file_name_string_idIdentifier of the target string to store the selected file name for display purposes (optional)empty
Exposed Objects
Exposed: v. 2.5PopupMenu pops up at the current mouse locationExposed only if the menu is instantiated outside of an existing menu
Exposed: v. 2.5RefreshRefresh the content of the menu by re-scanning the file system
Exposed: v. 2.5selected_file_indexThe index of the selected item in the flattened files list (-1 if not available)
Exposed: v. 2.5item_selectedFired when the user selects an item in the menu
Common attributesRead about `common`
idIdentifier of the elementThe id of an element has to be globally unique. Don't start with a digit for AngelScript compatibility.empty
Name Value type Default Description Comment
directoriesstringemptyList of directories to scan for files, separated by ';'
file_typesstringemptyList of file extensions in wildcard syntax, separated by ';'Example: *.txt;*.wav
scan_on_loadbooleantrueWhen true, the menu is filled when createdSet this attribute to false if you want to avoid the engine to scan the file system when loading the skin
root_pathstringemptyList of root directories that can be used to store relative file paths, separated by ';'If the directories are located within one of the root paths, corresponding file paths will be stored relatively to one of the root paths. This is useful when the root location of the files may change (Mac vs Windows, or username dependent paths etc.)
file_path_string_idstring idemptyIdentifier of the target string to store the selected file path (optional)The stored file path is releative to on of the paths specified in the root_path attribute
file_name_string_idstring idemptyIdentifier of the target string to store the selected file name for display purposes (optional)
Exposed Objects
Exposed: v. 2.5PopupactionMenu pops up at the current mouse locationExposed only if the menu is instantiated outside of an existing menu
Exposed: v. 2.5RefreshactionRefresh the content of the menu by re-scanning the file system
Exposed: v. 2.5selected_file_indexinteger paramThe index of the selected item in the flattened files list (-1 if not available)
Exposed: v. 2.5item_selectedeventFired when the user selects an item in the menu
Common attributesRead about `common`
ididentifieremptyIdentifier of the elementThe id of an element has to be globally unique. Don't start with a digit for AngelScript compatibility.

Example

Here we use menu to select a file located in one of directories listed. Using root_path to truncate (shorten) the resulted file path.

  1. <!-- file select menu -->
  2. <FILE_SELECT_MENU id="demo_file_select_menu"
  3. directories="$PLUGIN_USER_DOCUMENTS_PATH$Skins;$PLUGIN_USER_DOCUMENTS_PATH$Scripts"
  4. root_path="$PLUGIN_USER_DOCUMENTS_PATH$../.."
  5. file_types="*.xml;*.cxx" file_path_string_id="demo_file_path" file_name_string_id="demo_file_name"
  6. name="Select file" scan_on_load="false" />

  7. <!-- strings to save selection results -->
  8. <STRING id="demo_file_path" default="" />
  9. <STRING id="demo_file_name" default="" />

  10. <!-- trigger when item is selected -->
  11. <ACTION_TRIGGER event_id="demo_file_select_menu.item_selected" script="color_box.background_color.g=0.7;" requires="color_box.background_color.g;file_select_menu_demo1.selected_file_index" />

  12. <!-- layout -->
  13. <ROW spacing="10">
  14. <WIDGET id="color_box" background_color="#000000" width="10" height="15" />
  15. <TEXT value="Open menu" font_weight="bold">
  16. <INVISIBLE_ACTION_BUTTON action_id="demo_file_select_menu.Popup" width="100%" height="100%"/>
  17. </TEXT>
  18. </ROW>

  19. <!-- click to reload/scan files -->
  20. <SYSTEM_ACTION_BUTTON action_id="demo_file_select_menu.Refresh" />

  21. <!-- display/change selected file index -->
  22. <PARAM_TEXT_CONTROL param_id="demo_file_select_menu.selected_file_index" content="selected file index: {value}" value_format="0.0" />

  23. <!-- selected file name and path (minus root_path) -->
  24. <TEXT string_id="demo_file_name" font_size="11" />
  25. <TEXT string_id="demo_file_path" font_size="11" />

You can also use FILE_SELECT_MENU inside other POPUP_MENU or MENU_ITEM.


Comments

Please, authorize to view and post comments.

2020 - 2026 © Site by LetiMix · Donate  |  Plug'n Script and KUIML by Blue Cat Audio