Question
JavaScript .js Toolbar SubMenu)
Hi All -
I've put the following code (credit: http://khkonsulting.com/2009/03/counting-bookmarks/) in C:\Users\jxxxx\AppData\Roaming\Adobe\Acrobat\Privileged\DC\JavaScripts\bookmark.js
function CountBookmarks(bkm, nLevel)
{
var count = 0;
if (bkm.children != null)
{
count = bkm.children.length;
for (var i = 0; i < bkm.children.length; i++)
{
count += CountBookmarks(bkm.children[i], nLevel + 1);
}
}
return count;
}
function DoIt()
{
console.clear(); console.show();
var n = CountBookmarks(this.bookmarkRoot, 0);
console.println("Number of bookmarks found: " + n);
}
// add the menu item
app.addMenuItem({
cName: "countBookmarks",
cUser: "Count Bookmarks",
cParent: "Tools",
cExec: "DoIt();",
cEnable: "event.rc = (event.target != null);"
});For the life of me I can't figure out where the subMenu item is . . . what is "Tools" cParent? Where can I locate the dang button to test it.....
Thanks in advance.
