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

ScriptUI add icon to dialog window

Contributor ,
Jul 13, 2020 Jul 13, 2020

I would like to add the InDesign icon to my scriptUI dialog.

Or at least, some default icon : info, caution…

Does anyone have a snippet of code for this?

var i = myAlert.add ("image", [0,0,32,32],isThereAPresetNameForAppOrDefaultIcon?);

Thanks.

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

Community Expert , Jul 14, 2020 Jul 14, 2020

In the index, look under "resize, images"

Translate
Community Expert ,
Jul 14, 2020 Jul 14, 2020

Here's a guide that explains how to use icons and other images:

https://creativepro.com/files/kahrel/indesign/scriptui.html

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
Contributor ,
Jul 14, 2020 Jul 14, 2020

Thanks Peter,

 

I was just reading your pdf when the notification for your answer came to me.

 

Following your advice, I have embeded the Indy icon in my jsx file.

It's fine exept for 2 things:

- the icon will be out to date soon or later (not really a problem…)

- if I embed a 64x64 pixels, how to display it at 48x48?

(Is there to method to resize it on display or do I have to embed it at the exact size?)

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 ,
Jul 14, 2020 Jul 14, 2020

In the index, look under "resize, images"

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
Contributor ,
Jul 14, 2020 Jul 14, 2020

How could I miss this?

Thank you again!

 

I have another question:

In your pdf, there's a paragraph on displaying a window on a dual monitor configuration.

There's a thing I dont understand: how do you know which screen is the main (currently focused)?

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 ,
Jul 14, 2020 Jul 14, 2020

I have always assumed that the left one is the main screen, but the right one might be your main screen just as happily. As to focus, I don't think you can determine which screen is focussed. InDesign has very funny ideas on focus.

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
Contributor ,
Jul 14, 2020 Jul 14, 2020
LATEST

I think I've find a solution (at least for me):

I'm getting the indy document left bound to determine on which display it stands.

Then I can use the screen coordinates to place my Alert.

 

Thanks for your help!

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