Changing The Rectangle Marquee Size

You get the options, change what you need and then set them back with set
Check the solution of this topic - it’s almost exactly what you need