Open / Save file dialog

Moderator: Moderator Group

Open / Save file dialog

Postby RTuinte » Tue Feb 19, 2013 10:43 pm

Is there a option in WD that opens a file dialog were the user can select a file on the WD computer or on another computer in the network. And that WD saves the path to this file and the selected file name in a variable?
RTuinte
 
Posts: 17
Joined: Mon Jul 12, 2010 10:32 pm

Re: Open / Save file dialog

Postby Christopher Fluegel » Wed Feb 20, 2013 6:38 pm

Hi,

you can not directly select a file from a file dialog and save it to a variable but you can readout the content of a folder and the path to its files can be stored into a variable array.

Use the watchfolder input node to readout a specific path. Connect this node to a variable output node.
Create a new stringarray variable and select this variable in the variable output node. Also create a new string variable for the destination path you need later.
In the variable output node select the destination variable where the paths read by the watchfolder node where stored and as value select the watchfolder file paths.
The watchfolder now monitors the selected folder and writes all files with full path into that specified string array variable.

Now you need the script "VGetArrayValue,VarName,Index,ArrName". VarName describes the targetvariable, index is the file path for the specified file in the folder (e.g. first file in folder has index 0, second file has index 1, eighth file has index 7,...) and ArrName describes the variable name of the string array variable where all the üaths are stored.

To add a file to this folder use the "TreeView" control listed under "Create". In the tree view just right click on your watched folder and select add file.

The only issue is now that you dont really know which index your file has...but maybe this will help you too.

The function you want is on the wishlist.

I also added a screenshot of a example setup.
You do not have the required permissions to view the files attached to this post.
Christopher Fluegel
Technical Support, coolux GmbH
Christopher Fluegel
 
Posts: 112
Joined: Mon Feb 23, 2009 1:03 am
Location: Cologne, Germany


Return to Widget Designer V4.7

Who is online

Users browsing this forum: No registered users and 11 guests

cron