Skip to main content
Participant
October 4, 2022
Question

Slider Control range in ExtendScript

  • October 4, 2022
  • 2 replies
  • 1566 views

Hi guys, i'm not sure if this is the rigth forum but i'll try anyway. Does anyone knows how to define the range (minimum e maximum values) of a Slider Control created by ExtendScript? 

I'm pretty new in scripts techniques and i found this link https://community.adobe.com/t5/after-effects-discussions/modify-slider-range-with-script/m-p/10578911 but i don't even understand where to put this code, seems to me that it could work in expressions fields inside AE but not in the code editor. 

This topic has been closed for replies.

2 replies

Dan Ebberts
Community Expert
Community Expert
October 4, 2022

Scripting doesn't have access to the min and max values for a Slider Control. However, you could define your own slider with a pseudo effect by editing the PresetEffects.xml file. If you do that, you can set the min, max, and default values, then apply the effect with a simple script, save the effect off as a preset, which you could then apply via script. I think there are tools available to help with that process if you're not up for it.

FaoMayalAuthor
Participant
October 4, 2022

Dan!!!, it is an honor for me, thank you for your attention!

I'm trying to build my 1st script/plugin, so i think my best choice will be build it with a dockable UI instead of using a slider control effect.

Dan Ebberts
Community Expert
Community Expert
October 4, 2022

Are you talking about creating a slider within your script UI, or is this a completely different approach than you originally had in mind? Because you can define min and max values for a UI slider, but they are a little tricky to deal with, as I recall.

Mathias Moehl
Community Expert
Community Expert
October 4, 2022

I don't think there is a scripting function to set the range of a slider, unfortunately. The only workaround I know of is to save the slider with the range you want as an animation preset and then apply the animation preset whenever you want to create a slider with that range.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
FaoMayalAuthor
Participant
October 4, 2022

Hi Mathias, thank you for your attention. Unfortunately it won't work for me because the slider control, as all the components of the comp, will be created by a script that needs to run on any workstation. But thanks anyway!!