Monday, October 27, 2008

Script version of @Prompt( [LocalBrowse] )


In the bookmark.nsf there is a script library call 'APICalls' - this library contains 2 functions:

- GetDirDlg
- OpenFileDlg

The GetDirDlg returns a string with the full path name of the selected folder/directory
OpenFileDlg returns 1 if the user has selected a file and presses the OK button. The full path and filename is then stored in a global variable called 'FileName'

Example 1:
        path = GetDirDlg()

Example 2:
        if OpenFileDlg() = 1 thwn
                print "You selected: " & filename
        end if

note: the functions calls the WinAPI - so they will only work in windows

0 comments:

 
Creative Commons License
This work is licensed under a Creative Commons Attribution 3.0 Unported License.