I'm posting this script, called Rusty's New Dynamic Range Script, as a result of a request in a thread where user @okyou asked for help in creating a more even lighting for an image where the left side of the image was less illuminated than the right. That thread is here:
viewtopic.php?f=56&t=64359
The script was created by Peter Anderson back when PSPX1 was the latest version, but should work with all versions. The stated purpose of the script is to increase the dynamic range of an image. The practical purpose is to even out the dynamic range of an image where the lighting is uneven in a gradual way. The major perceptual effect is to make the darker areas lighter and the lighter areas darker, and it affects the entire image.
The script creates a duplicate of the layer you're working on, which duplicate layer acts as an adjustment layer. The script's actions result in a blurred layer (which is named RDR in the Layers palette) that, essentially, provides more exposure to the darker areas of the underlying layer and less exposure to the lighter areas.
Also, the RDR layer is in Overlay mode, and defaults to 50% opacity. Increasing this opacity increases the effect on the underlying layer, and decreasing it decreases the effect. When you achieve the lighting effect you're looking for, you can merge the RDR layer with the underlying layer, and then you can do further tweaking that might be necessary. Because it affects overall lighting, once you have merged the RDR layer with the underlying layer you might, for example, find you want to now increase the overall brightness and/or contrast, maybe use Clarity, perhaps sharpening, etc.
The script doesn't work miracles so don't expect to get the best results if part of the image is really dark and other parts really light, but it works quite well on many ordinary uneven lighting situations as you can see from the the image I posted in the original thread after applying the script (link above).
You can place the script in your Scripts Restricted folder once unzipped.