Name
PathRequest -- pop up a path requester (V2.0)
Synopsis
p$ = PathRequest(title$[, t])
Deprecated syntax
p$ = PathRequest(title$[, mode, defdir$])
Function
This function opens a path requester that allows the user to select a path. You can specify the title of the requester by setting the title$ argument. This can also be an empty string ("") to use the default title.

PathRequest() returns the user's path selection or "" if the user has cancelled the requester.

PathRequest() supports several optional arguments. Before Hollywood 9.0, those had to be passed as optional parameters (see above). Since Hollywood 9.0, however, it is recommended to use the new syntax, which has a single optional table argument that can be used to pass one or more optional arguments to PathRequest().

The following table fields are recognized by this function:

Mode:
The Mode table tag allows you to specify the mode of the path requester. This can either be #REQ_SAVEMODE for save mode or #REQ_NORMAL for normal mode. Defaults to #REQ_NORMAL.

Path:
This table tag can be used to specify the initial path for the path requester. (V3.0) By default, this will be the current directory.

X:
Initial x-position for the path requester on the screen. Not all platforms support this. (V9.0)

Y:
Initial y-position for the path requester on the screen. Not all platforms support this. (V9.0)

Width:
Initial width for the path requester dialog. Not all platforms support this. (V9.0)

Height:
Initial height for the path requester dialog. Not all platforms support this. (V9.0)

Inputs
title$
title for the requester; pass an empty string ("") to use the default title
t
optional: table containing further arguments (see above) (V9.0)
Results
p$
the user's selection or an empty string if he cancelled the requester
Example
p$ = PathRequest("Select a path")
If p$ = ""
  Print("Requester cancelled!")
Else
  Print("Your selection: ")
  Print(p$)
EndIf
Ask the user for a path and print its name.

Show TOC