Name=Open:: Difference between revisions
(Created page with "When using Name=Open: BR will prompt the operator to select a file, and then open the file using the Windows API. In the following example, an Open File Dialog Box will open,...") |
No edit summary |
||
Line 2: | Line 2: | ||
In the following example, an Open File Dialog Box will open, and will open to the "Last Selected Folder", Name Open: has memory, and will remember file history and default file location. | In the following example, an Open File Dialog Box will open, and will open to the "Last Selected Folder", Name Open: has memory, and will remember file history and default file location. | ||
00010 open #1: "name=OPEN:text documents (*.txt) |*.txt,recl=1,shr",external,input ioerr 100 | 00010 open #1: "name=OPEN:text documents (*.txt) |*.txt,recl=1,shr",external,input ioerr 100 | ||
Line 28: | Line 9: | ||
00200 XIT: ! | 00200 XIT: ! | ||
In the example above: | |||
*"name=OPEN:"instructs BR to open a Open File Dialog Box. | |||
*"text documents (*.txt)" defines the label for the filter combo box (Lower Right Corner). | |||
*The Pipe (|) is a separator. | |||
*(*.txt) is the actual filter that will be used when displaying files. | |||
@: or @:: is needed | When using file dialogs with client server, @: or @:: is needed. The file dialog runs on the client side and doesn't have access to server side files - except through windows networking. | ||
Client Server | See the following Client Server example: | ||
00010 open #1: "name=OPEN:@:text documents (*.txt) |*.txt,recl=1,shr",external,input ioerr 100 | 00010 open #1: "name=OPEN:@:text documents (*.txt) |*.txt,recl=1,shr",external,input ioerr 100 | ||
Line 39: | Line 25: | ||
00200 XIT: ! | 00200 XIT: ! | ||
@: | *"@:" instructs the program to use the "Client Default Folder" as the default folder. | ||
*"@::" instructs the program to use the "A Client Folder" as the default folder. | |||
@:: | |||
It is possible to specify a specific folder as well as specify multiple filters. | It is possible to specify a specific folder as well as specify multiple filters. | ||
The following example | The following example will display all ".ini" files as well as ".txt" files in the C:\Windows folder. | ||
Remember that @: & @:: are required for Client Server. | Remember that @: & @:: are required for Client Server. |
Revision as of 21:37, 28 January 2013
When using Name=Open: BR will prompt the operator to select a file, and then open the file using the Windows API.
In the following example, an Open File Dialog Box will open, and will open to the "Last Selected Folder", Name Open: has memory, and will remember file history and default file location.
00010 open #1: "name=OPEN:text documents (*.txt) |*.txt,recl=1,shr",external,input ioerr 100 00020 print File$(1) 00030 close #1: 00100 print "Operation Canceled: Err=";Err 00200 XIT: !
In the example above:
- "name=OPEN:"instructs BR to open a Open File Dialog Box.
- "text documents (*.txt)" defines the label for the filter combo box (Lower Right Corner).
- The Pipe (|) is a separator.
- (*.txt) is the actual filter that will be used when displaying files.
When using file dialogs with client server, @: or @:: is needed. The file dialog runs on the client side and doesn't have access to server side files - except through windows networking.
See the following Client Server example:
00010 open #1: "name=OPEN:@:text documents (*.txt) |*.txt,recl=1,shr",external,input ioerr 100 00020 print File$(1) 00030 close #1: 00100 print "Operation Canceled: Err=";Err 00200 XIT: !
- "@:" instructs the program to use the "Client Default Folder" as the default folder.
- "@::" instructs the program to use the "A Client Folder" as the default folder.
It is possible to specify a specific folder as well as specify multiple filters.
The following example will display all ".ini" files as well as ".txt" files in the C:\Windows folder.
Remember that @: & @:: are required for Client Server.
Component | Description |
---|---|
NAME=Open: | instructs BR to open a Open File Dialog Box. |
C:\Windows\ | The Windows Path, it is important to include the final "\" and not include any filters |
Space Between \ & the Filter Combo Box Description. This is not required, but may aid in understanding the syntax. | |
Text Files (*.ini;*.txt) | Filter Combo Box Description - Will be displayed in the Combo Box Filter. (Optional). |
The Pipe is a separator. | |
*.ini;*.txt | This is a list of actual filters that will be used when displaying files. Delimit the list with a ";" |
00010 OPEN #1: "name=OPEN:C:\Windows\ Text Files (*.ini;*.txt)|*.ini;*.txt,recl=1,shr",EXTERNAL,INPUT IOERR 100 00020 PRINT File$(1) 00030 CLOSE #1: 00100 PRINT "Operation Canceled: Err=";Err 00200 XIT: !
This is a much less complicated Sample that simply allows the user to pick an "Ini" file from the C:\Windows Folder.
00010 OPEN #1: "name=OPEN:C:\Windows\*.ini,recl=1,shr",EXTERNAL,INPUT IOERR 100 00020 PRINT File$(1) 00030 CLOSE #1: 00100 PRINT "Operation Canceled: Err=";Err 00200 XIT: !