Promotic
WikipediaLinkedInYoutubeTwitterFacebook

InputBoxForFilePath - method of the Pm object

Description:
Input window for displaying and selection of files/folders.
This method is obsolete (but functional) and it is better to use the Pm.CreateView method - see Opening the viewer for folder/file selection (/#glob/filepath).
Syntax:
Boolean InputBoxForFilePath(String sTitle, Long nStyle, String sFilePath, String sExt, String sFilter)
Parameters:
sTitle(String) Title of the input window.
nStyle(Long) Bit flags defining window type and content.
Hexadecimal numbers can be entered by adding a prefix: for JavaScript it is 0x and for VBScript it is &H. For example, 0x10 or &H10 in hexadecimal represents 16 in decimal.
It is possible to enter the following styles or their combinations as a sum:
&H100 - Cannot go through the subfolders.
&H200 - Cannot go through the parent-folders.
&H300 - Cannot change the folder.
&H400 - Selected file must exist.
&H1000 - Selected file mustn't exist.
&H800 - Confirmation is requested.
&H2000 - Folders are not displayed.
&H4000 - Only folders are displayed.
&H10000000 - Window will be "Always on top".
&H8000 - The window can be closed only by selecting the file. It means that if the folder (marked in blue) is selected, then the window cannot be closed by the "OK" button.
sFilePath(String) It is recommended to use the PROMOTIC path syntax - see PROMOTIC path to files and folders.

on the calling: the full path to the file or folder (for the window initialization).
after the calling: the selected file or folder.
sExt(String) Default extension of the selected file.
sFilter(String) String enabling the filtering of the file content. Examples:
- display of all files: sFilter="All files (*.*)|*.*||"
- display files with the extension '.TXT': sFilter="TXT files (*.TXT)|*.TXT||"
- display files with the extension '.TXT' and '.INI': sFilter="TXT files (*.TXT)|*.TXT|INI files (*.INI)|*.INI||"
Return values:
true - If the window has been closed by the "OK" button.
false - If the window has been closed by the "Cancel" button.
Note:
It allows depending on the nStyle parameter to go through folders on the disk and to select (or enter) the file or the folder. If the window is closed by the "OK" button, then the full path and the file name is stored in the sFilePath.

This method is not functional in Web panels.
Example:
VBScriptSelect and copy to clipboard

Dim sFile, sFilter
sFile = "#appres:triangle.jpg"
sFilter = "Images (*.jpg)|*.jpg|All files (*.*)|*.*||"
If Pm.InputBoxForFilePath("Select image", &H200, sFile, "jpg", sFilter) Then
Pm.Debug "file = " & sFile
End If

History:
Pm9.00.09: This method is obsolete (but functional).
PROMOTIC 9.0.16 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
Navigation:
 
- Pm
 
- Abs
- Cos
- E
- Exp
- InputBoxForFilePath
 
 
- LN2
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice