Replace Pages

Explorer ,
Jan 02, 2020

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

Adobe Community Professional
Correct answer by Thom Parker | Adobe Community Professional

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

TOPICS
Acrobat SDK and JavaScript, How to

Views

205

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Replace Pages

Explorer ,
Jan 02, 2020

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

Adobe Community Professional
Correct answer by Thom Parker | Adobe Community Professional

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

TOPICS
Acrobat SDK and JavaScript, How to

Views

206

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jan 02, 2020 0
Most Valuable Participant ,
Jan 02, 2020

Copy link to clipboard

Copied

app.execMenuItem("ReplacePages");

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 02, 2020 0
Explorer ,
Jan 02, 2020

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 02, 2020 0
Adobe Community Professional ,
Jan 02, 2020

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 02, 2020 0
Explorer ,
Jan 04, 2020

Copy link to clipboard

Copied

Splendid!
Many Thanks

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jan 04, 2020 1