Copy link to clipboard
Copied
Hi i just need to show up dialog window.
Because its impossible to set shortcut to replace pages, all i need is show dialog windows. The same dialog window when i click on replace pages, window has name CZ - Vyberte soubor s novými stránkami ENG - Select File With New Pages. Can some one please post JS code? I believe it will be 3 lines code max. The rest i will do with AutoHotkey script.
Many Thanks
EDIT: in active document of course 🙂
Screen here:
https://ctrlv.cz/hLzy
The JavaScript menu item runs JavaScript. Just typing in "ReplacePages" doesn't do it.
The JavaScript you need was provided by Try67. So here's what your code needs to look like:
app.addMenuItem ({cName: "Nahradit stránky", cParent: "Edit", cExec: 'app.execMenuItem("ReplacePages")'});
Note the change in quotes. This is necessary because the execMenuItem code uses a quoted string, and is itself quoted.
Here's an article on how this is done:
https://acrobatusers.com/tutorials/print/add_custom_menu_items/
...Copy link to clipboard
Copied
app.execMenuItem("ReplacePages");
Copy link to clipboard
Copied
Thank you, BUT... 🙂
i cant add a shortcut even a Javascript so i tried created new menu item (then i can use Autohotkey) but can you help me with this please:
app.addMenuItem ({cName: "Nahradit stránky", cParent: "Edit", cExec: "ReplacePages" });
I get a error: internal error.
https://ctrlv.cz/wRqK
Copy link to clipboard
Copied
The JavaScript menu item runs JavaScript. Just typing in "ReplacePages" doesn't do it.
The JavaScript you need was provided by Try67. So here's what your code needs to look like:
app.addMenuItem ({cName: "Nahradit stránky", cParent: "Edit", cExec: 'app.execMenuItem("ReplacePages")'});
Note the change in quotes. This is necessary because the execMenuItem code uses a quoted string, and is itself quoted.
Here's an article on how this is done:
https://acrobatusers.com/tutorials/print/add_custom_menu_items/
And you can find out lots more about creating automation tools for Acrobat Here:
https://www.pdfscripting.com/public/Automating-Acrobat.cfm
Copy link to clipboard
Copied
Splendid!
Many Thanks