scripting help to manage layers

Hi Boomers !

As I’m not efficient in javascript I’m looking for a charitable soul to help me making a script for the following tasks :

( I’m exposing my request with a “photoshop scripting logic” with witch I’m more used )

  • rename selected layer “newBG”
  • duplicate selected layer (“newBG”)
  • rename created layer “blank”
  • select layer “blank” (in case it isn’t)
  • select the whole content of selected layer (“blank”)
  • turn selected content to white
  • set selected layer opacity to 40% (enter value in a box ?)

Optional:

  • select layers “newBG”;“blank”

  • create folder “BG” containing selected layers

  • end script

Many thanks for whom could help me with this :slight_smile: