juetiez
5th December 2013, 08:34
Hi
Can somebody teach me how to use this function
dir.select.dialog.local()
Thanks
bhushanchanda
5th December 2013, 09:23
Hi,
First you will need to include this in your program script:-
#include <bic_desktop>
and #pragma used dll ottdllbw if you want to use other related functions.
Now, the function is used to enable user to select a directory on his local machine.
So, you can declare a variable say
string path(100)
You can use it like this:-
path = ""
dir.select.dialog.local(path)
Now, the path variable will have the complete path to the folder/directory you have selected in the dialog.
It can be used during upload's & download's of the files, reports, documents etc.
For e.g. If you want to create a file on your server and then want to transfer it back to your local machine at a specified directory, you can code something like this:-
long ret
path = ""
if dir.select.dialog.local(path) = 1 then
path = path&"\"&"My_Report.xls"
exec_dll_function( "ottdllbw" , "server2client" , ret, server_file.path, path, 0 )
if ret < 0 then
message("Error during transfer of file to local machine.")
else
message("File transfered successfully at your Machine")
endif
endif
juetiez
6th December 2013, 02:33
Thanks for your reply. This works!