StoreWins() Sleep(5000) RestoreWins() Func StoreWins($file = "windows.ini") Local $var = WinList() If FileExists($file) Then FileDelete($file) For $i = 1 to $var[0][0] If IsVisible($var[$i][1]) Then Local $pos = WinGetPos($var[$i][1]) IniWrite($file, Binary($var[$i][0]), "x", $pos[0]) IniWrite($file, Binary($var[$i][0]), "y", $pos[1]) IniWrite($file, Binary($var[$i][0]), "w", $pos[2]) IniWrite($file, Binary($var[$i][0]), "h", $pos[3]) EndIf Next EndFunc Func RestoreWins($file = "windows.ini") Local $var = WinList() For $i = 1 to $var[0][0] If IsVisible($var[$i][1]) Then If IniRead($file, $var[$i][0], "x", False) Then Local $pos = WinGetPos($var[$i][1]) WinMove($var[$i][0], "", IniRead($file, Binary($var[$i][0]), "x", $pos[0]), IniRead($file, Binary($var[$i][0]), "y", $pos[1]), IniRead($file, Binary($var[$i][0]), "w", $pos[2]), IniRead($file, Binary($var[$i][0]), "h", $pos[3])) EndIf EndIf Next EndFunc Func IsVisible($handle) Return BitAnd(WinGetState($handle), 2) EndFunc