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

Export PowerMath Equations to ASCII

Explorer ,
Dec 20, 2021 Dec 20, 2021

Hi Everyone,

I want to convert the PowerMath equations to ASCII in indesign document using javascript. Please help me. See below picture for more details:

 

pm.png 

Thanks,

Magesh

 

TOPICS
Scripting
519
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

correct answers 1 Correct answer

Engaged , Jan 01, 2022 Jan 01, 2022

Hi @Mageshwaran 

 

You can use below function on desktop version.

export_powerMath();

function export_powerMath() {
    var doc = app.documents[0];
    for (var i = 0; i < doc.stories.length; i++) {
        try {
            app.select(doc.stories[i].texts[0]);
            app.menuActions.itemByID(471686).invoke();
        } catch (e) {
            alert("PowerMath Plug-in not installed in this machine.\ror\rMenu action ID not found.");
            exit(0);
        }
    }
}
Translate
Community Expert ,
Dec 21, 2021 Dec 21, 2021

Is that plug-in scriptable? You can ask its author if it is and if it is, ask them for a manual.

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
Engaged ,
Jan 01, 2022 Jan 01, 2022

Hi @Mageshwaran 

 

You can use below function on desktop version.

export_powerMath();

function export_powerMath() {
    var doc = app.documents[0];
    for (var i = 0; i < doc.stories.length; i++) {
        try {
            app.select(doc.stories[i].texts[0]);
            app.menuActions.itemByID(471686).invoke();
        } catch (e) {
            alert("PowerMath Plug-in not installed in this machine.\ror\rMenu action ID not found.");
            exit(0);
        }
    }
}
-Sumit
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 ,
Jan 02, 2022 Jan 02, 2022
LATEST

Hi @SumitKumar,

Thanks for your wonderful help!

I will check and let you know if any further support to be needed.

Thanks,
Magesh

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