Maximize question

Reverting is only as a result of unmaximizing, and hence returning the window to its original size and position.

You’d probably have to write a function that stores the windows geometry prior to maximisation and then restores the window afterwards (hint: see, $[w.x], $[w.y], Move). You might also want to look at the ResizeMoveMaximize command.