Highlighted

ScriptUI add icon to dialog window

Community Beginner ,
Jul 13, 2020

Copy link to clipboard

Copied

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.

Adobe Community Professional
Correct answer by Peter_Kahrel | Adobe Community Professional

In the index, look under "resize, images"

Topics

Scripting

Views

131

Likes

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

ScriptUI add icon to dialog window

Community Beginner ,
Jul 13, 2020

Copy link to clipboard

Copied

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.

Adobe Community Professional
Correct answer by Peter_Kahrel | Adobe Community Professional

In the index, look under "resize, images"

Topics

Scripting

Views

132

Likes

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

Copy link to clipboard

Copied

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

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

Likes

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
Reply
Loading...
Community Beginner ,
Jul 14, 2020

Copy link to clipboard

Copied

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?)

Likes

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
Reply
Loading...
Adobe Community Professional ,
Jul 14, 2020

Copy link to clipboard

Copied

In the index, look under "resize, images"

Likes

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
Reply
Loading...
Community Beginner ,
Jul 14, 2020

Copy link to clipboard

Copied

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)?

Likes

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
Reply
Loading...
Adobe Community Professional ,
Jul 14, 2020

Copy link to clipboard

Copied

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.

Likes

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
Reply
Loading...
zeRafio LATEST
Community Beginner ,
Jul 14, 2020

Copy link to clipboard

Copied

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!

Likes

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
Reply
Loading...