I want to split this image
in several layers, one for each square.
Is there a way to do that?
You can bind the action to a key and press it repeatedly for each row. After you finish a row select the first square on the next and run the action again.
Now all the squares are seperate layers.
Hope this helps
Start with the image as the only layer. Duplicate layer many times - one for each square. (Original layer could count as one, but you may prefer to keep it handy, just in case.) Use the eraser tool on each layer to erase all but one square. Be careful to keep track of which square you want to keep.
This involves no effort aligning, unlike single-square copy/paste techniques.
Perhaps Photoshop has a way to trim the size of layer if it has huge margins of pure transparent around a small area. If so, that would help reduce memory usage and file size.