I have a confession: my portfolio of JS tools is a mess. Whilst all the files are in the correct Apps folder and some show in my desktop Add-on Tools tab, some do not and I don't know how to access them. I would prefer to have all my JS tools in my Add-on Tab although I may place duplicates in other tabs such as Comments, etc. for convenience.
So, (i) how do I get access to all my saved JS tools and (ii) how do I get all JS tools to show in my Add-on Tools tab?
All help and suggestions will be welcome.
Organizing JavaScript Tools
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
PHK
- User
- Posts: 1684
- Joined: Tue Nov 24, 2020 4:02 pm
Organizing JavaScript Tools
All best,
FringePhil
FringePhil
-
Daniel - PDF-XChange
- Site Admin
- Posts: 13321
- Joined: Wed Jan 03, 2018 6:52 pm
Re: Organizing JavaScript Tools
Hello, PHK
You would need to modify this in each JS file itself.
Under the app.addtoolbutton function - there are a few properties, one or two indicating toolbar (if that line is omitted, they will default to the add-on tools toolbar) and one labelled nPos (which dictates the order on whichever toolbar they are part of). EG; Modify these items to adjust the default positions of your custom tool buttons.
Kind regards,
You would need to modify this in each JS file itself.
Under the app.addtoolbutton function - there are a few properties, one or two indicating toolbar (if that line is omitted, they will default to the add-on tools toolbar) and one labelled nPos (which dictates the order on whichever toolbar they are part of). EG; Modify these items to adjust the default positions of your custom tool buttons.
Kind regards,
You do not have the required permissions to view the files attached to this post.
Dan McIntyre - Support Technician
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
[email protected]
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
[email protected]
-
PHK
- User
- Posts: 1684
- Joined: Tue Nov 24, 2020 4:02 pm
Re: Organizing JavaScript Tools
Thank you, Daniel. However, I am not inclined to go down the rabbit hole of learning how to write JS just to solve this minor annoyance.
All best,
FringePhil
FringePhil
-
Daniel - PDF-XChange
- Site Admin
- Posts: 13321
- Joined: Wed Jan 03, 2018 6:52 pm
Re: Organizing JavaScript Tools
Hello, PHK
In this case, it isn't so much a matter of learning to write JS, as it is - if these buttons are on the toolbar, they already have most of this in place. In most cases, you simply need to change the singular number following the nPos value, to sort these items.
In any situation, I will wish you an excellent day!
Kind regards,
In this case, it isn't so much a matter of learning to write JS, as it is - if these buttons are on the toolbar, they already have most of this in place. In most cases, you simply need to change the singular number following the nPos value, to sort these items.
In any situation, I will wish you an excellent day!
Kind regards,
Dan McIntyre - Support Technician
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
[email protected]
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
[email protected]
-
Mathew
- User
- Posts: 957
- Joined: Thu Jun 19, 2014 7:30 pm
Re: Organizing JavaScript Tools
Of course, everything is more complicated due to the legacy of an old API: There are two commands that can add tool buttons in the Ribbon UI:Daniel - PDF-XChange wrote: ↑Mon Sep 21, 2026 4:25 pm Modify these items to adjust the default positions of your custom tool buttons.
- app.addToolButton adds buttons to the "Add-on" ribbon
- app.addMenuItem adds to any other menu
Sooo, it becomes a bit of a haystack, but searching for the following in the text of a javascript file should give you a clue where the default locations were -- although the ID can be a bit cryptic:
- cParent gives the location in the classic UI
- cRbParent gives the location in the ribbon UI
I think one feature request that could make things easier for FringePhil (and for me) would be for there to be a category of javascripts in the "Customize Toolbars" "Commands" tab (all the custom tools have the prefix js.cmd. for their ID so internally PDF XChange does keep track of which menu items came from javascript)...
My Javascript Snippets tool is a start on a tool that one would install all scripts through, and would keep track of where all the scripts are; but it's still a very early work in progress.
-
Daniel - PDF-XChange
- Site Admin
- Posts: 13321
- Joined: Wed Jan 03, 2018 6:52 pm
Re: Organizing JavaScript Tools
Hello, Mathew
A very good point - and thank you for the breakdown. I actually forgot we had added the option to manually drag custom tools around as well! I expect that you can only reset those by using the "reset toolbars" option in the customize toolbars window (or with a complete application settings reset)
Kind regards,
A very good point - and thank you for the breakdown. I actually forgot we had added the option to manually drag custom tools around as well! I expect that you can only reset those by using the "reset toolbars" option in the customize toolbars window (or with a complete application settings reset)
Kind regards,
Dan McIntyre - Support Technician
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
[email protected]
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
[email protected]
-
PHK
- User
- Posts: 1684
- Joined: Tue Nov 24, 2020 4:02 pm
Re: Organizing JavaScript Tools
i have used and appreciate the ability to drag JS tools around and, more specifically, from the dedicated ribbon of Add-on Tools. And that's why I would like to collect all my JS tools in that one place as a starting point for customizing my UI with these tools.
All best,
FringePhil
FringePhil
-
Daniel - PDF-XChange
- Site Admin
- Posts: 13321
- Joined: Wed Jan 03, 2018 6:52 pm
Organizing JavaScript Tools
Dan McIntyre - Support Technician
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
[email protected]
PDF-XChange Co. LTD
+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
[email protected]