Copy link to clipboard
Copied
Ok, so we have:
ObjectStylesPanelPopup
SwatchesPanelPopup
PagesPanelPopup
But...
I can not find the one for the Paragraph and Character styles panel menu....
Can someone help me here?
(trying to add an item to this menu)
Copy link to clipboard
Copied
Try to use:
app.menus.item('$ID/Paragraph Style Panel Menu')
app.menus.item('$ID/Character Style Panel Menu')
Copy link to clipboard
Copied
Everytime I am looking for a menu name, I do
app.menuActions.everyItem().name.join("\r");
Then I look for the string I am interested in
Then I use
app.findKeyStrings ( "someMenuActionName" );
return for ex:
$ID/TouchMenuOpen
Copy link to clipboard
Copied
That is just it, nothing shows as result. I've tried all menu ID's (I have a script that does the same, list all menu's and ID's etc) but there is no Panel ID for Paragraph and Character popupmenu as is for ObjectStylesPanelPopup (as I stated in the first mail)
Copy link to clipboard
Copied
Nope, ('$ID/Paragraph Style Panel Menu') with or without spaces, this is not working (does not exist)
Copy link to clipboard
Copied
Indeed findKeyStrings returns undefined when I try to get the non localized string.
However a workaround is to get the menuAction instance 's id and call the object accordingly.
In french Paragraph Styles will be "Styles de paragraphe".
So I use this localized string to get the id:
var mid = app.menuActions.itemByName ("Styles de paragraphe").id;
Then using the id
app.menuActions.itemByID (8450).invoke();
FWIW
Loic
Copy link to clipboard
Copied
(8450) is a string IN the panelmenu, just using this to add it under (8450) as item fails, we need to target the flyout menu itself first THEN an ID like (8450)...
(Believe I tried 😉 )
Copy link to clipboard
Copied
Try to use:
app.menus.item("$ID/ParaStylePanelPopup");
app.menus.item("$ID/CharStylePanelPopup");