add adjustment layer
Why does not "kind:levels layer" work - but kind:normal works?
tell application "Adobe Photoshop 2023"
tell current document
set newlayerproperties to {kind:levels layer, grouped:false, background layer:false}
set x to make new art layer with properties newlayerproperties
end tell
end tell
From the documentastion:
kind (black and white layer/brightness contrast layer/channel mixer layer/color balance layer/color lookup/curves layer/exposure layer/gradient fill layer/gradient map layer/hue saturation layer/inversion layer/levels layer/normal/pattern fill layer/photo filter layer/posterize layer/selective color layer/smart object layer/solid fill layer/text layer/threeD layer/threshold layer/vibrance layer/video layer) : to create a text layer set this property to 'text layer' on an empty art layer of type 'normal'
