; Stamps the Height/Width of the read Window onto the Set Window #include #include HotKeySet("^!+R", "_Read") HotKeySet("^!+S", "_SetSize") HotKeySet("^!+X", "_SetX") HotKeySet("^!+Y", "_SetY") Global $height = 1024 Global $width = 768 Global $xValue = 0 Global $yValue = 0 Global $readWinTitle = "unset" Global $writeWinTitle = "unset" While 1 Sleep(500) WEnd Func _Read() ; Retrieve the position as well as height and width of the active window. Local $pos = WinGetPos("[ACTIVE]") $readWinTitle = WinGetTitle("[ACTIVE]") $width = $pos[2] $height = $pos[3] $xValue = $pos[0] $yValue = $pos[1] TrayTip ( "Read Size and Position", '"The Size and Position of the window "' & $readWinTitle& '" was saved', 5, $TIP_ICONASTERISK) EndFunc Func _SetSize() $writeWinTitle = WinGetTitle("[ACTIVE]") Local $pos = WinGetPos("[ACTIVE]") Local $x = $pos[0] Local $y = $pos[1] WinMove("[ACTIVE]", "", $x, $y, $width, $height) TrayTip ( "Applied Size and Position", '"The Size of the window "' & $readWinTitle& '" was applied to the window "' & $writeWinTitle & '"', 5, $TIP_ICONASTERISK) EndFunc Func _SetX() $writeWinTitle = WinGetTitle("[ACTIVE]") Local $pos = WinGetPos("[ACTIVE]") Local $x = $pos[0] Local $y = $pos[1] Local $w = $pos[2] Local $h = $pos[3] WinMove("[ACTIVE]", "", $xValue, $y, $w, $h) TrayTip ( "Applied X coordinate", '"The X coordinate of the window "' & $readWinTitle& '" was applied to the window "' & $writeWinTitle & '"', 5, $TIP_ICONASTERISK) EndFunc Func _SetY() $writeWinTitle = WinGetTitle("[ACTIVE]") Local $pos = WinGetPos("[ACTIVE]") Local $x = $pos[0] Local $y = $pos[1] Local $w = $pos[2] Local $h = $pos[3] WinMove("[ACTIVE]", "", $x, $yValue, $w, $h) TrayTip ( "Applied Y coordinate", '"The Y coordinate of the window "' & $readWinTitle& '" was applied to the window "' & $writeWinTitle & '"', 5, $TIP_ICONASTERISK) EndFunc