🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: adobe.scripting.indesign
Article #2273

Re: [JS] CS3 file.openDialog ()

#2273
From: Kasyan Servetsky
Date: Sat, 20 Dec 2008 14:27
26 lines
1830 bytes
Hi Doug,

To set as default ‘Desktop’, ‘My Documents’ or some other folder is a matter of personal liking. I personally prefer to work with my files on Desktop and put them away, when finished.
But this is not so important.
Just replacing
var myLastFile = new File("~/Desktop/");
with
var myLastFile = Folder.myDocuments;
will make ‘My Documents’ to open as default.

But the problem is different:

      The problem is I am sending this script to someone else it and the folder
      he will want it to default to will be changing as the project he works
      on changes.





As far as I understand, the user wants the script to ‘remember’ the last opened folder.
And I posted the snippet to show my approach – using application’s insertLabel and extractLabel methods. I think it has an advantage: no need to create an additional file to store preferences.

We used to have the same problem at work, because we keep our files on a network drive and it is very annoying to walk through several subfolders each time you want to open/place a file. We solved this by using ‘Default Folder’.

Kasyan
Technical Details
Message-ID: <59b75018.7@webcrossing.la2eafNXanI>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!news2!newshub.sdsu.edu!webcrossing
References: <EC6A0C909B0E62E316337EC10946A1BB@in.webcrossing.la2eafNXanI>

Show Full Headers
Complete Article Headers
X-Google-Thread: f939a,4092301e56a7cb3f
X-Google-Attributes: gidf939a,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Kasyan Servetsky" <askoldich@yahoo.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!news2!newshub.sdsu.edu!webcrossing
Newsgroups: adobe.scripting.indesign
Subject: Re: [JS] CS3 file.openDialog ()
Message-ID: <59b75018.7@webcrossing.la2eafNXanI>
Date: Sat, 20 Dec 2008 06:27:49 -0800
References: <EC6A0C909B0E62E316337EC10946A1BB@in.webcrossing.la2eafNXanI>
Lines: 30
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit