This content has been marked as final.
Show 8 replies
-
1. Re: Sort (or rearrange) Print Presets
(Olivier_Berquin) Sep 12, 2006 7:11 AM (in response to 3ABNPublishing)Yes: you can export them one by one, and re-import them... one by one.
Oli. -
2. Re: Sort (or rearrange) Print Presets
3ABNPublishing Sep 12, 2006 7:42 AM (in response to 3ABNPublishing)Groan ... but thanks! At least that would save deleting and recreating them. I wonder if the data is saved somewhere in a more conveniently editable format, like as XML preferences file? -
3. Re: Sort (or rearrange) Print Presets
spancilhill Sep 12, 2006 8:02 AM (in response to 3ABNPublishing)This has come up before several times, Michael. My method (I've done this twice now) is to click on the print preset you want at the top of the list, click 'new' and name it. Then delete the old preset. Select the print preset you want second on the list, click 'new' and name it. Then delete the old and so on through your 'old' presets. -
4. Re: Sort (or rearrange) Print Presets
(Dave_Saunders) Oct 12, 2006 4:55 AM (in response to 3ABNPublishing)This JavaScript sorts the printer presets, leaving the [Default] where it is at the head of the list (if I tried to include it, the script failed):
Bad version deleted, see below
I've only tested it with CS2, but I expect it works with CS1.
To use the script in CS2, copy and paste to ExtendScript Toolkit and save with an appropriate name in the form ScriptName.jsx in the Scripts folder of the Presets folder of your InDesign CS2 folder (you could put it in a subfolder if you wish). Then to run the script, set-up the appropriate initial conditions and double-click the script's name in the Scripts palette.
For CS1, resave from ESTK (if you have it as part of CS2, otherwise, use a text editor and save as plain text) in the comparable location but with a name in the form ScriptName.js.
BTW, this is a version of one of the scripts I'll be featuring in my JavaScripting InDesign session at Seattle at the InDesign Conference Master Class. For more info, look here: http://www.barrycon.com/schedule.php?sid=1&cid=16 You'll find my session in the fifth column on Tuesday afternoon.
Dave -
5. Re: Sort (or rearrange) Print Presets
3ABNPublishing Oct 12, 2006 5:48 AM (in response to 3ABNPublishing)Thanks, Dave. Works like a charm. Perfect! -
6. Re: Sort (or rearrange) Print Presets
(Dave_Saunders) Nov 19, 2006 7:01 PM (in response to 3ABNPublishing)I have belatedly realized that this script I so proudly published a month and a half ago has a serious bug. the middle loop is wrong.
Here is the corrected version://DESCRIPTION: Sort Printer Presets
The previous version messed up the definition of the alphabetically first preset. Sorry it took me so long to discover this.
myPresets = app.printerPresets;
myNames = myPresets.everyItem().name;
myNames.shift(); // lose [Default]
myNames.sort(lc); // sort remaining names
for (j = 0; myNames.length > j; j++) {
myPresets.item(myNames[j]).duplicate();
}
for (j = myNames.length; j > 0; j--) {
myPresets[1].remove();
}
for (j = 0; myNames.length > j; j++) {
myPresets[j+1].name = myNames[j];
}
function lc(a,b){
a = a.toLowerCase();
b = b.toLowerCase();
if (a > b) { return 1 }
if (b > a) { return -1 }
return 0
}
Dave -
7. Re: Sort (or rearrange) Print Presets
3ABNPublishing Nov 20, 2006 7:06 AM (in response to 3ABNPublishing)Thanks! -
8. Re: Sort (or rearrange) Print Presets
Jim Beals Jul 14, 2014 3:21 PM (in response to (Dave_Saunders))Dave,
I finally after many years, got fed up and decided to search for a solution to this problem and I see you solved it almost 8 years ago. I am VERY GRATEFUL. My only question is if it is possible to modify the script to do the same thing with document presets? Thanks again.
Jim Beals
