Being able to move the items as it does - rather than manually doing so each time - is very useful, but I'd rather not have to click the button each time I login, reload or the addons otherwise reset themselves.
Typing /console in a macro can be translated to /CVar in an addon.
Can the word "script" be translated - in the same sort of way - into something that would work in a simple addon?
If possible, could you give an example of how a line would look in script and then "translated"?
The only thing to look out for is that if what you want to alter isn't created or otherwise ready to be altered yet, you will need to be a tiny bit more advanced with your Lua scripting.
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh
I finally got around to doing as you suggested and it's really as simple as it looks.
It works perfectly and means that the pet bar is back in its pre-Cataclysm position and I no longer need to click a script button to get it there.