If you are recording Photoshop copy-paste-extract actions that will play back on image files of a different size, first set Photoshop’s measurement units to percentage.
Then, when you record select+copy, it will select everything from one corner to the other and copy it. Rather than copying a fixed width of pixels.