These functions are to resize the active window to consume the entire active monitor (minus the task bar). I wrote this for a Java application that wouldn’t maximize correctly if moved to a monitor running at a different resolution than the one it started on.

Code for ConsumeMonitor.ahk:

Code to include it in an existing script:

Code to assign it to a hotkey (Ctrl+Up Arrow):