Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

OpenDialog to a specific folder

People's Champ ,
Jun 02, 2008 Jun 02, 2008
Hi,
I saw this question was discussed already but following the tip, I don't have any success. Moreover I couldn't post in the thread so I have to open this topic. Sorry about that.

Well,
here is the matter :
var myfile = File("\\192.168.1.1\Marketing\17. Produits\COPY\Tiff_CMYK_300dpi\ok\copyripok_uk.tif");
myfile.openDialog(); // > ERROR

/*

File.openDialog() // Works great.

*/

So it's so annoying. Where am I wrong ?
Thanks for help
Loic
TOPICS
Scripting
4.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Aug 17, 2008 Aug 17, 2008
I've just realized why it is not at all odd that (as I said in message 9) "...no matter what you do, application files are always active..."

The reason is that they are returned to ExtendScript as folders, not files, so my previous code that explicitly tested for files with a .app extension was on the right track but in the wrong place. If you want to exclude applications, you need to add logic to the folder detection code, returning false if the folder name ends in .app.

You can check this by running:

#target indesign
alert(app.fullName.constructor.name)

It displays an alert that says Folder.

Dave
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 17, 2008 Aug 17, 2008
LATEST
On 17/8/08 11:02 PM, "Dave Saunders" <member@adobeforums.com> wrote:<br /><br />> they are returned to ExtendScript as folders, not files<br /><br />Presumably only if they are packaged as bundles; these days that's pretty<br />much all apps, but older ones might not be. And some "files" are also<br />packages and therefore presumably returned as folders, although they're much<br />rarer.<br /><br />-- <br />Shane Stanley <sstanley@myriad-com.com.au>
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines