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.
Yes you can, here's an example:
var slider = myWindow.add ("slider", undefined, 50, 0, 100);
slider.onChanging = function () {/* do stuff with slider.value */}
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 */}
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.