Copy link to clipboard
Copied
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/1057891... 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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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!!
Copy link to clipboard
Copied
By the way, Mathias is an honor too!!!
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
well, a few lines ago i was thinking about, but rigth now i'm not that sure...
i want to expose a slider with a -100 to 100 range, i know that i can set any value injecting an expression in timeline and do some math, but it won't be friendly for users.
Maybe a graphic representation of a slider with a guide layer interface works