I have created a folder level javascript to show a custom search dialog box when it is called from buttons on certain pages within an indexed and interlinked collection of PDF files.
Within this script I have added a menu item to the Help menu, which when selected opens the search dialog. This all worked but of course the additional menu item appeared as soon as Acrobat/Reader was opened regardless of whether it was a file within this collection or not. To limit the menu item to appear only when the associated PDFs were being used I made the add menu item instruction a trusted function which is then called from a document level javascript in the main (openning) menu page of this PDF collection. This too works, apart from the fact that everytime the user returns to the main menu it causes the menu item to be added again, so I am getting repeat additions of the same menu item.
Is there a way of coding either the add menu trusted function or the call command from the document so that it registers whether the menu item is already there and if so it will not repeat the operation.
Any other ways around this problem?
Thanks in anticipation.
Nifty
Norfolk, England
Using Acrobat 8.2.5 Professional