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

Scripting Interface Elements like a button?

Contributor ,
Jul 21, 2023 Jul 21, 2023

This is my first attempt to script something in Photoshop…  I was hoping that someone might be able to point me to basic information on scripting interface elements like buttons.

 

’Im trying to do what should be the simplest of things draw a button that takes up 100% of the width of its container? And then enable disable the button.

 

I've tried:

 

 

var btnOne = interfaceGroup.add("button", undefined, "Some Text");
btnOne.disabled = true;

btnOne.size and btnOne.preferredSize don’t except percentages.

 

 

Any link to  scripting interface elements w/ JavaScript would be greatly appreciated. Thanks - CES

TOPICS
Actions and scripting
485
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 21, 2023 Jul 21, 2023

@evan.sante 

 

Wanting to do something with a UI in scripting is much harder than without a UI, so for your first script you have complicated things for yourself.

 

Once you have the UI working, you still need to link up the actual code to "do something" to the button.

 

Anyway, the following should get you started:

 

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

 

https://scriptui.joonas.me/ (Chrome browser required)

 

https://theiviaxx.github.io/photoshop-docs/ScriptUI/index.html

...
Translate
Adobe
Community Expert ,
Jul 21, 2023 Jul 21, 2023

@evan.sante 

 

Wanting to do something with a UI in scripting is much harder than without a UI, so for your first script you have complicated things for yourself.

 

Once you have the UI working, you still need to link up the actual code to "do something" to the button.

 

Anyway, the following should get you started:

 

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

 

https://scriptui.joonas.me/ (Chrome browser required)

 

https://theiviaxx.github.io/photoshop-docs/ScriptUI/index.html

 

Good luck!

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 21, 2023 Jul 21, 2023
LATEST

Thank you this is exactly what I was looking for..

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