BrowseFile: Difference between revisions

From Planimate Knowledge Base
Jump to navigation Jump to search
(New page: Browse for a file. Returns non zero if one chosen. $R = BrowseFile($1,$2) <br> $R = File Chosen $1 = File Spec $2 = Save Mode <br> $1 sets an initial file, $2 enables a save-sty...)
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 9: Line 9:
$2 = Save Mode  
$2 = Save Mode  


<br> $1 sets an initial file,
<br> $1 sets an initial file, you can also use it to specify the intial path and file mask. Eg. setting it to a string of "c:\*.bmp;*.jpg;*.gif" will open the browser at c:\ and have a file mask set for bmp, jpg and gif files.


$2 enables a save-style dialog.  
<br> $2 enables a save-style dialog, ie. set it to 1 and the FileDialog will not expect you to select a file that exists but allow you to specify a new filename, the activate button will also be "Save" rather then "Open"


 
<br> Use s.LastAccessedDataFile and s.LastAccessedDataFilePath to access the file and full path spec of the file selected.  
Setting $1 to a file mask (ie *.txt) will cause the browser to filter to the file mask
 
 
Use s.LastAccessedDataFile and s.LastAccessedDataFilePath to access the file and full path spec of the file selected.


[[Category:Routine]]
[[Category:Routine]]

Latest revision as of 15:47, 30 September 2009

Browse for a file. Returns non zero if one chosen.

$R = BrowseFile($1,$2)


$R = File Chosen

$1 = File Spec

$2 = Save Mode


$1 sets an initial file, you can also use it to specify the intial path and file mask. Eg. setting it to a string of "c:\*.bmp;*.jpg;*.gif" will open the browser at c:\ and have a file mask set for bmp, jpg and gif files.


$2 enables a save-style dialog, ie. set it to 1 and the FileDialog will not expect you to select a file that exists but allow you to specify a new filename, the activate button will also be "Save" rather then "Open"


Use s.LastAccessedDataFile and s.LastAccessedDataFilePath to access the file and full path spec of the file selected.