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

Slider UI Element

Explorer ,
Apr 25, 2019 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.

TOPICS
Scripting

Views

480

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 , Apr 25, 2019 Apr 25, 2019

Yes you can, here's an example:

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

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

Votes

Translate

Translate
Community Expert ,
Apr 25, 2019 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 */}

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
Community Beginner ,
Apr 08, 2020 Apr 08, 2020

Copy link to clipboard

Copied

LATEST

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.

 

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