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

Tool Button

Community Beginner ,
Jan 27, 2021 Jan 27, 2021

Copy link to clipboard

Copied

I wanna add tool button but i'm having trouble adding custom dialog box to it, can I put dialog somewhere
else like in function and add that to cExec? there must be an easier way?
This is what I have:

app.addToolButton({
cName: "Dialog",
cLabel: "Dialog",
cExec: "var oDlg ={description:{name: \"Test Dialog\",elements:[{name: \"Hello World\",type: \"static_text\",},{type: \"ok\",},]};app.execDialog(oDlg);",
cTooltext: "Click to get the message.",
nPos: 0});

TOPICS
JavaScript

Views

223

Translate

Translate

Report

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

Community Expert , Jan 27, 2021 Jan 27, 2021

Converting a script to a string is tricky. I would suggest putting the code in a function and then just calling that function from the cExec parameter.

Votes

Translate

Translate
Community Expert ,
Jan 27, 2021 Jan 27, 2021

Copy link to clipboard

Copied

LATEST

Converting a script to a string is tricky. I would suggest putting the code in a function and then just calling that function from the cExec parameter.

Votes

Translate

Translate

Report

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