File Dialog

What would you like to see in CSPro?
Forum rules
New release: CSPro 8.0
Post Reply
juanf11
Posts: 12
Joined: July 7th, 2020, 2:19 pm

File Dialog

Post by juanf11 »

Hello.-

Would it be possible to add to CSPro a File Dialog that lets you choose a certain file so that its route becomes a string in the CSPro application?

This would allow for more flexible data syncing with files.

Thanks.
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: File Dialog

Post by Gregory Martin »

You can build one yourself with a little CSPro:
list string data_files;
dirlist(data_files, "../Data/*.csdb");

if data_files.length() > 0 then

    numeric
selection = data_files.show("Which file do you want to sync?");

   
if selection > 0 then
        // do something with data_files(selection)
   
endif;

endif;
juanf11
Posts: 12
Joined: July 7th, 2020, 2:19 pm

Re: File Dialog

Post by juanf11 »

Hello Gregory.

Using a weird mix of direxist, dircreate, the below code and execsystem with explorer.exe to said folder and some pausing errmsgs I've managed to do kind of what I wanted to with some extra steps.

This is because the files I wanted to select through a file dialog would be some which don't really 'belong' to the CSPro environment but are part of the user's work tools (which mean they keep it under their file repertoire.

It's a long workaround but I managed to do it, nonetheless I insist it would be a good feature to have, so I hope it will be taken into consideration.

Thanks. -
Post Reply