Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

Paragraph/Character Styles panel popup menu?

Community Expert ,
May 29, 2017 May 29, 2017

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)

TOPICS
Scripting
976
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
May 29, 2017 May 29, 2017

Try to use:

app.menus.item('$ID/Paragraph Style Panel Menu')

app.menus.item('$ID/Character Style Panel Menu')

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
May 30, 2017 May 30, 2017

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 30, 2017 May 30, 2017

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)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 30, 2017 May 30, 2017

Nope, ('$ID/Paragraph Style Panel Menu') with or without spaces, this is not working (does not exist)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
People's Champ ,
May 30, 2017 May 30, 2017

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 30, 2017 May 30, 2017

(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 😉  )

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 28, 2021 Oct 28, 2021
LATEST

Try to use:

app.menus.item("$ID/ParaStylePanelPopup");
app.menus.item("$ID/CharStylePanelPopup");

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