-
1. Re: [JS][CS5] Application Labels
Laubender Aug 25, 2011 11:04 PM (in response to Roy Marshall)Hi, Roy!
Do the application labels persist after doing a dot update?
About your question: I don't know a way to trace the labels, which does not imply there is no way to do so.
Regarding labels on document level you can trace, modify, add or delete them in an IDML file.
Uwe
-
2. Re: [JS][CS5] Application Labels
Harbs. Aug 29, 2011 5:08 AM (in response to Roy Marshall)Do app labels persist after trashing prefs?
(I don't really use them much...)
-
-
4. Re: [JS][CS5] Application Labels
Harbs. Aug 29, 2011 6:11 AM (in response to Marijan Tompa)Thanks. That's what I would have guessed...
Harbs
-
5. Re: [JS][CS5] Application Labels
Roy Marshall Aug 29, 2011 6:37 PM (in response to Harbs.)Hi Harbs/Marijan
Would you recommend using a config file in the scripts folder instead of using Application labels?
I did find a way to open a file in the InDesign Application folder that contained the labels, but was not easy to read, and certainly wouldn't make any changes to it as it also contained garbled text that I am assuming would cause problems if I resaved as a text file.
Cheers
Roy
-
6. Re: [JS][CS5] Application Labels
Harbs. Aug 29, 2011 11:36 PM (in response to Roy Marshall)Yes. I would definitely recommend writing to a config file instead. It's not really much harder, and it leaves you in the drivers seat...
Harbs
-
7. Re: [JS][CS5] Application Labels
Marijan Tompa Aug 30, 2011 12:13 AM (in response to Roy Marshall)Hi Roy,
It's definitely better to save settings to file.
You can create simple JSON text file from your settings object (myObject.toSource()),
and just use eval() to convert it back to Object.
Another, more safer way is to create XML file
and use E4X to find specific settings you need to load.
I think that saving file into InDesign application folder is not a good idea.
On some systems, especially Windows Vista and Windows 7,
saving to Application folder is disabled if the UAC (User Account Control) is enabled.
You could save user settings to native user data folder.
var setFolder = Folder(Folder.userData.absoluteURI + "/RoyMarshall"); if(!setFolder.exists) setFolder.create(); var setFile = File(parentFolder.absoluteURI + "/myScriptSettings.xml");
Hope that helps.
--
Marijan (tomaxxi)
-
8. Re: [JS][CS5] Application Labels
Roy Marshall Aug 30, 2011 2:24 PM (in response to Marijan Tompa)Thanks guys.
That seems like a pretty safe method using the xml in the users folder. Works nicely.
Just a small thing though..
var setFile = File(parentFolder.absoluteURI + "/myScriptSettings.xml");parentFolder needs to be setFolder, but I know this was quickly put together for my instructions so no matter!!
Cheers again
Roy



