Let me see if I have this correct. For example, you want to use the last value used from say Gaussian Blur and use that number in your filter or action?
If that is correct, you would need to set up a listener for the Guassian Blur event and pull apart that descriptor to get the value when it is executed. Store it off somewhere and use it when your filter or script gets executed.
Actually what I want to know: Is it possible to run a filter from a script and make it display its last used settings? And is it possible to do that without having to store and retrieve these settings from a previous execution of the filter?
As far as I can see you can only run a filter from a script
1. with settings of your own (by supplying them with an ActionDescriptor)
2. with its default settings (by supplying no settings in the ActionDescriptor)
It would be great if you could run a filter with its last used settings from a script without using a tedious workaround. If that is not possible the easy way, I will have to store these settings after a filter is executed and retireve and supply them when the filter is executed again.
When restarting Photoshop the last used settings of a filter, e.g. Gaussian Blur, are retained. So I guess they are stored somewhere, probably in the Photoshop Prefs file. So maybe they can be found by searching that file, but I would rather want to avoid that.
Thank, Paul! That's it! I found the solution in that script. You need to pass "undefined" instead of an ActionDescriptor to make a filter display the last used setting.
Thanks, Davide. Maybe I will need the event stuff for another task.