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

JS: Open App Data Folder?

Community Expert ,
May 07, 2012 May 07, 2012

Would this script work for any possible combination of InDesign, platform, and OS version? On my Windows 7 (CS4) I get to see the folder for my own app data, as intended.

Folder(Folder.userData+"/Adobe/InDesign/Version "+app.version.match(/^\d+\.\d+/)+"/"+$.locale).execute();

TOPICS
Scripting
2.9K
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
LEGEND ,
May 07, 2012 May 07, 2012

Nope. That folder does not exist on Mac.

What exactly are you trying to do?

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
Community Expert ,
May 07, 2012 May 07, 2012

Harbs. wrote:

Nope. That folder does not exist on Mac.

Ah--one of the "incompatible" differences then.

What exactly are you trying to do?

I wuz hoping for a little script to simply show users where their local settings were stored No such thing possible, alas.

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
LEGEND ,
May 07, 2012 May 07, 2012

But this should do it:

if(File.fs == "Macintosh"){

    File(Folder.userData.parent+"/Preferences/Adobe InDesign/Version "+app.version.match(/^\d+\.\d+/)+"/"+$.locale).execute();

} else {

    Folder(Folder.userData+"/Adobe/InDesign/Version "+app.version.match(/^\d+\.\d+/)+"/"+$.locale).execute();

}

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
LEGEND ,
May 07, 2012 May 07, 2012

Although I like this construct a little better...

if(File.fs == "Macintosh"){

    File(Folder.userData.parent+"/Preferences/Adobe InDesign/Version "+parseFloat(app.version)+"/"+$.locale).execute();

} else {

    Folder(Folder.userData+"/Adobe/InDesign/Version "+parseFloat(app.version)+"/"+$.locale).execute();

}

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
Community Expert ,
May 07, 2012 May 07, 2012

userData.parent -- not @ my Mac, what does that point to? Is that simply ~/Library ?

.. Also, is this a useful script?

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 ,
May 07, 2012 May 07, 2012

Can't you simply use:

File(Folder.appData).execute();

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
Community Expert ,
May 07, 2012 May 07, 2012

Hi Dave! (Long time no see, happy to have you back!)

This yields C:\ProgramData on my system, not that useful. Browsing down and choosing intelligently, I can find an ID "Scripting Support" folder, but that's about it.

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
LEGEND ,
May 07, 2012 May 07, 2012

Yeah. ~/Library is probably a better way to write it...

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
Guru ,
May 07, 2012 May 07, 2012

Is it not now hidden anyhows? I only have snow leopard…

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
Community Expert ,
May 07, 2012 May 07, 2012

Muppet Mark wrote:

Is it not now hidden anyhows? I only have snow leopard…

Not on my system it is!

Do yourself a favour and stick to SL as long as you possibly can (All my favourite games turned out to be PowerPC-only!)

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
Guru ,
May 07, 2012 May 07, 2012

I thought user library was hidden from Lion… As for OS's only move from last dot to last dot… Unless they put me old mate oscar back in the trash…

Have you noticed that ~/Advanced Editor is now hidden unless you go back and edit afterwards… Hiding stuff of use must be the new thing…

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
LEGEND ,
May 07, 2012 May 07, 2012
LATEST

You don't see the Library folder by default, but you can open it using other methods.

Harbs

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