Highlighted

Slider UI Element

Community Beginner ,
Apr 25, 2019

Copy link to clipboard

Copied

Hi, my name is Bram and I'm curious if it's possible to create a slider UI element in script UI in ExtendScript.

Thx for helping in advance.

Adobe Community Professional
Correct answer by justintaylor | Adobe Community Professional

Yes you can, here's an example:

var slider = myWindow.add ("slider", undefined, 50, 0, 100);

slider.onChanging = function () {/* do stuff with slider.value */}

TOPICS
Scripting

Views

195

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

Slider UI Element

Community Beginner ,
Apr 25, 2019

Copy link to clipboard

Copied

Hi, my name is Bram and I'm curious if it's possible to create a slider UI element in script UI in ExtendScript.

Thx for helping in advance.

Adobe Community Professional
Correct answer by justintaylor | Adobe Community Professional

Yes you can, here's an example:

var slider = myWindow.add ("slider", undefined, 50, 0, 100);

slider.onChanging = function () {/* do stuff with slider.value */}

TOPICS
Scripting

Views

196

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
Apr 25, 2019 0
Adobe Community Professional ,
Apr 25, 2019

Copy link to clipboard

Copied

Yes you can, here's an example:

var slider = myWindow.add ("slider", undefined, 50, 0, 100);

slider.onChanging = function () {/* do stuff with slider.value */}

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...
Apr 25, 2019 0
Community Beginner ,
Apr 08, 2020

Copy link to clipboard

Copied

Hello, I digged this topic up, because I want to do the same: Creating a UI with a slider controlling a value such as scale, opacity, position etc.. Now I'm a beginner with both JavaScript and ExtendScript respectively, so don't wonder if my questions and ideas are completely stupid. The UI itself can be created with either the famous UI scripting guide or with this amazing site: https://scriptui.joonas.me

 

Anyway, the here's what I have so far:

 

dialog.Zoomer.slider1.onChanging = function() {
alert("This slider works");
}

--------------------------------------------------------------------------------------------------------------------------

So far I managed to attach the alert to the slider just to test whether it works at all. But what do I have to do from here?

I think I have to access the parameter that I intend to change, let's say the Opacity:

 

dialog.Zoomer.slider1.onChanging = function() {
app.project.item(24).layer("World Map").property("ADBE Transform Group").property("ADBE Opacity").value
}

 

So essentially, what do I have to do that moving the mouse leads to the value being changed? Once again, I'm sorry if this is too stupid of a question, but I really want to learn this.

 

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...
Apr 08, 2020 0