func_system_requestfile.rst 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. .. _func_system_requestfile:
  2. ===========
  3. RequestFile
  4. ===========
  5. RequestFile -
  6. Description
  7. ===========
  8. .. code-block:: blitzmax
  9. RequestFile$( text$,extensions$="",save_flag=False,initial_path$="" )
  10. Display system file requester.
  11. @text is used as the title of the file requester.
  12. The optional @extensions string can either be a comma separated list of
  13. file extensions or as in the following example groups of extensions
  14. that begin with a "group:" and separated by a semicolon.
  15. @save_flag can be True to create a save-style requester, or False to create a load-style requester.
  16. @initial_path is the initial path for the file requester.
  17. Note that a user interface may not be available when in graphics mode on some platforms.
  18. Parameters
  19. ==========
  20. Return Values
  21. =============
  22. The path of the selected file or an empty string if the operation was cancelled.
  23. Examples
  24. ========
  25. .. code-block:: blitzmax
  26. ' requestfile.bmx
  27. filter$="Image Files:png,jpg,bmp
  28. Text Files:txt
  29. All Files:*"
  30. filename$=RequestFile( "Select graphic file to open",filter$ )
  31. Print filename
  32. See Also
  33. ========