JS: Open App Data Folder?
Copy link to clipboard
Copied
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();
Copy link to clipboard
Copied
Nope. That folder does not exist on Mac.
What exactly are you trying to do?
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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();
}
Copy link to clipboard
Copied
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();
}
Copy link to clipboard
Copied
userData.parent -- not @ my Mac, what does that point to? Is that simply ~/Library ?
.. Also, is this a useful script?
Copy link to clipboard
Copied
Can't you simply use:
File(Folder.appData).execute();
Dave
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Yeah. ~/Library is probably a better way to write it...
Copy link to clipboard
Copied
Is it not now hidden anyhows? I only have snow leopard…
Copy link to clipboard
Copied
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!)
Copy link to clipboard
Copied
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…
Copy link to clipboard
Copied
You don't see the Library folder by default, but you can open it using other methods.
Harbs

