This subroutine stores info for one undo operation. But I'm trying to figure out how to store a table in an object with the window handle as the key. The user hits a hotkey to move the active window. The old position is saved to undo. But I'd like to save maybe 1/2 dozen undo positions for each handle. I can't figure out from the examples how to insert the 4 window position values as a row in a table rather than just a simple array, then stick that in an associative array with window handle as key.
wArray := Object() SaveUndoInfo: WinGetPos,x,y,w,h, ahk_id %AWindow% wPos := [x,y,w,h] wArray[AWindow] := wPos return
What I'm trying to do in pseudo-code is:
If handle in assocarray as key, use it to fetch
table from object and assign to a variable.
Append new position info, or read old position
info out of the table. If appending, insert the
augmented table back into assocarray.




