Nee option to save all the opened files, but not to close it
Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, Tracker Supp-Stefan
Nee option to save all the opened files, but not to close it
Nee option to save all the opened files, but not to close it.
This is to ensure that all the changes are saved for the opened pdf files..
but i dont want to close them.
This is to ensure that all the changes are saved for the opened pdf files..
but i dont want to close them.
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Nee option to save all the opened files, but not to close it
Hello hafeesh,
This can currently be done by executing the JavaScript in the Console (https://www.pdf-xchange.com/knowle ... nge-Editor):
Alternatively, you can create the button to do this:
This code will add the button to the File menu:
Here, you can see how to make that JS execute every time you launch the Editor:
https://www.pdf-xchange.com/knowle ... the-Editor
Cheers,
Alex
This can currently be done by executing the JavaScript in the Console (https://www.pdf-xchange.com/knowle ... nge-Editor):
Code: Select all
var activeDocs = app.activeDocs;
for (var i = 0; i < activeDocs.length; i++)
{
var doc = activeDocs[i];
app.execMenuItem("Save", doc);
}
Code: Select all
function saveAllOpenDocs()
{
var activeDocs = app.activeDocs;
for (var i = 0; i < activeDocs.length; i++)
{
var doc = activeDocs[i];
app.execMenuItem("Save", doc);
}
}
app.addMenuItem({ cName: "Save All Open Documents", cParent: "File",
cExec: "saveAllOpenDocs()",
nPos: 3
});
https://www.pdf-xchange.com/knowle ... the-Editor
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: Nee option to save all the opened files, but not to close it
Thanks for that very much !!!Sasha - Tracker Dev Team wrote: ↑Sat Jan 19, 2019 9:46 am app.addMenuItem({ cName: "Save All Open Documents", cParent: "File", cExec: "saveAllOpenDocs()", nPos: 3 });
It's impossible to lead us astray for we don't care even to choose the way.
PDF-XChange PRO, 10.1.1 (Build 381) / W7 SP1 x64
PDF-XChange PRO, 10.1.1 (Build 381) / W7 SP1 x64
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Nee option to save all the opened files, but not to close it
Hello Ovg,
I didn't write the state update part (disabled/enabled) though it will just do nothing if you have no documents to save - so it should suffice like that
Cheers,
Alex
I didn't write the state update part (disabled/enabled) though it will just do nothing if you have no documents to save - so it should suffice like that
Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Re: Nee option to save all the opened files, but not to close it
Thank you very much
I will try creatign the button.
I will try creatign the button.
-
- User
- Posts: 5522
- Joined: Fri Nov 21, 2014 8:27 am
- Contact:
Re: Nee option to save all the opened files, but not to close it
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
- Jensen Head
- User
- Posts: 430
- Joined: Mon Sep 13, 2021 8:12 am
Re: Nee option to save all the opened files, but not to close it
I ran this code in the console, the "Save All Open Documents" button appeared, but clicking it does not save all open, modified and unsaved documents - they still display the "changed" icon on the tabs.Sasha - Tracker Dev Team wrote: ↑Sat Jan 19, 2019 9:46 amAlternatively, you can create the button to do this: (...)
For now, I use the command from the quick search: added it as a button to the "Quick Access" panel.
Maybe it makes sense, after all, to add this button as standard, "out of the box"?
Upd. How do I remove this button now?
- Tracker Supp-Stefan
- Site Admin
- Posts: 17948
- Joined: Mon Jan 12, 2009 8:07 am
- Location: London
- Contact:
Re: Nee option to save all the opened files, but not to close it
Hello Jensen Head,
Just tested this custom menu command - and it worked perfectly fine for me.
Please note that this will work for files that have already been created. If you have "New Document" ones - that have not yet been saved to disk - the "Save All" command will take you to the "Save As" option instead.
Kind regards,
Stefan
Just tested this custom menu command - and it worked perfectly fine for me.
Please note that this will work for files that have already been created. If you have "New Document" ones - that have not yet been saved to disk - the "Save All" command will take you to the "Save As" option instead.
Kind regards,
Stefan