However, I dont understand what you are hinting to with that discussion
1 person found this helpful
if you want to store data (folderpath), the discussion shows ways to do so.
Additional approach could be to write and read data to / from a file ...
Last night I managed to do it by writing it into a preference file.
However, that is not the best option, since this info shouldnt necessarily be saved from day to day...
So the information you pointed me to was great - worked great.
Here is what I did:
As I mentioned in my first post, the script uses the openDialog function.
Seemingly, that function opens a dialog to the last PARENT folder only, but not to the inner folder which was last used.
So what was needed was, to get the last used folder name and path,
and to then use the opendlg function with that information.
var theFile = File.openDialog() ; // retrieves the file name chosen by the user app.insertLabel("Open_Dlg_Dir", theFile) ; // inserts the file info into the application label under the name "Open_Dlg_Dir"
The next time around, the script checks for that info:
theFile = app.extractLabel("Open_Dlg_Dir") ; // retrieves the info that is stored into the app label var theFile = File(theFile).openDlg() ; // retrieves the file name chosen by the user
Actually, I conditioned in the beginning of the script
if theFile == null then use the openDialog function, otherwise, use the openDlg function
I wonder that insertLabel coerces the fileObject to fsPath! But obviously it does. ..