Skip to main content
Inspiring
March 21, 2011
Question

Slider in Photoshop UI

  • March 21, 2011
  • 2 replies
  • 1978 views

Has anyone got a simple example of how a slider works within the photoshop UI (CS2). I know the UI isn't well documented and can be a bit of a pain to impliment - especially if you're not entirely sure what your doing. What I'm after is a slider that updates in tandem with the document rather than present the UI and then perform the main function after slider values have been set. I've got the main (simple) script which draws a star made from a path, but I want to add a slider than allows you to choose the number of points of the star and see it update as you go. I know there's SNPCreateSlider.jsx but I don't know how to update the document and the slider at the same time - if that makes any sense. Or is this sort of thing veering towards filter plug-in functionality?

Cheers.

This topic has been closed for replies.

2 replies

c.pfaffenbichler
Community Expert
Community Expert
March 21, 2011

If you define an onChange function for the slider you can have the Script create a Path while still in the dialog (and on repeated change you can remove the old Path and create a new one again). Edit: That is if I remember correctly …

An example should be found here:

http://www.ps-scripts.com/bb/viewtopic.php?f=17&t=3382&sid=7c792a479e004c3078d9bfa04dc3e6a6

GhoulfoolAuthor
Inspiring
March 24, 2011

Unfortunatley the script is for CS4 and functions like supendHistory don't work in CS2. Which brings me to this question: Is there any documentation of Photoshop Scripting history? - added funtions etc as the verions have progressed since scripting came out in version 7. Cheers.

c.pfaffenbichler
Community Expert
Community Expert
March 24, 2011

Sorry, I had overlooked that CS2 is the intended application in this case.

One yould just raise the function from suspendHistory and run it itself, but I don’t know what else would fail to run in CS2.

Muppet_Mark-QAl63s
Inspiring
March 21, 2011

Search the ID scripting forum for Peter's 'ScriptUI for dummies' PDF version 1.4 was made available just last week… sliders and a bunch of other examples in there very useful beginners guide…

GhoulfoolAuthor
Inspiring
March 21, 2011

Look like I picked thr right week for being a dummy! Thanks Muppet Mark.

Muppet_Mark-QAl63s
Inspiring
March 21, 2011

What you are asking for may go beyond what's covered in the guide PDF but it should provide some additional examples of using ScriptUI that may prove useful…