Oh, I didn't realize you meant more by "changing the window size" than changing between fullscreen and windowed.
First, you'll need to find the index values for the resolutions you want to use. Type "/dump GetScreenResolutions()" and take note of the indices for the two resolutions you want to swap between. The indices should never change unless you get a new video card, or make some other system change that changes the resolutions your video card can handle.
Then, put those indices into this macro in place of <BIG> and <SMALL>:
Code:
/run local w = GetCVar("gxWindow") SetCVar("gxWindow", 1 - w) SetScreenResolution(w == "1" and <BIG> or <SMALL>) RestartGx()
You shouldn't need to explicitly set gxMaximize to 0 over and over, but if it's getting reset for some reason, you can just add that bit back in there.