These forums are now Read Only. If you have an Acrobat question, ask questions and get help from one of our experts.

Script to mimic keyboard shortcuts

webpointz
Registered: May 21 2009
Posts: 36
Answered

Does anyone know where there is a listing of how to do javascript calls that mimic menu items?

Looking for a way (possibly using app.execMenuItem) to call a sub-menuitem function from the main menu item "Advanced".

In my current script, I added a menuitem under "Advanced" that pre-saves the open PDF to a designated folder but I would like it to also initiate the "Advanced/Extend Features in Adobe Reader" menuitem call so that users don't forget to enable rights.

My Product Information:
Acrobat Pro 9.2, Windows
gkaiseril
Expert
Registered: Feb 23 2006
Posts: 4308
That feature has been disabled for some time.

George Kaiser

webpointz
Registered: May 21 2009
Posts: 36
I know for security reasons it's not available using app.execMenuItem(), however just wondering if there are javascript functions that can mimic using ALT-KEY behaviour.

For instance, ALT+"A" then ALT+"n" calls the Extend Rights menu item at which time the user can simply click "save now".
try67
Online
Expert
Registered: Oct 30 2008
Posts: 2399
execMenuItem is not disabled, it's just has more strict security restrictions.
And no, there's no way to mimic keyboard shortcuts in JS. Only an external script can do that.

- AcrobatUsers Community Expert - Contact me personally at try6767 [at] gmail [dot] com
Check out my custom-made scripts website: http://try67.blogspot.com