Skip to content
This repository has been archived by the owner on Mar 18, 2021. It is now read-only.
/ WindowSaver Public archive

An AutoHotkey script that will save your window positions and then restore them to the saved position

License

Notifications You must be signed in to change notification settings

KroniK907/WindowSaver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project has been abandoned

Windows 10 creator update now saves your window locations and status before a restart or shutdown and brings everything back automatically. Thus the use for this script is basically gone.

If you still have some use for this code, feel free to fork it, but I will not be providing any support or further development for this project.

Old install instructions:

WindowSaver

An AutoHotkey Script
v0.1
Created by Daniel Kranich
Based on DockWin v0.3 by Paul Troiano

Description

This is a script that can save the location and size of all of your windows and then restore those windows to their correct positions at a later time.

Features

  • Specifically designed to work with Windows10 Virtual Desktops
    • Assigns a desktop to each window
    • Restores to the appropriate desktop
  • Works well with multiple monitors
  • Can save multiple layouts depending on monitor setup
    • If you switch between a single monitor and a dual screen setup, you can save a layout with each monitor setup
    • Restores the correct layout depending on number of monitors connected
  • Saves weather a window is maximized or minimized
  • Call from any ahk script

Uses

I use this script when I need to do a windows update or need to restart my computer for any reason. I can simply save my layout before shutdown and then when I have rebooted, I can re open all the programs I had running and hit a hotkey and have it all back the way it was before. I also have a laptop which I may or may not have connected to a secondary monitor. I can save a layout, with and without my second monitor and every time I switch I can hit a hotkey and have all my windows arranged the way I like.

Installation

Simple Install
Download WindowSaver.exe
The exe must be run with one of the two following paramaters

  • snap
    • Takes a snapshot of your current layout and saves the details to WinPos.txt
  • restore
    • Figures out which saved layout it should restore
    • Restores all windows to their appropriate places

Example:
"C:\path\to\exe\WindowSaver.exe snap"
"C:\path\to\exe\WindowSaver.exe restore"

Install With Source
Downlad the source .ahk files.
Use the same method as above but by calling your local AutoHotkey.exe

Example:
"C:\path\to\AutoHotkey.exe C:\path\to\WindowSaver.ahk snap"
"C:\path\to\AutoHotkey.exe C:\path\to\WindowSaver.ahk restore"

Set Up Hotkey
You can set up a hotkey using the following

key:: Run "C:\path\to\WindowSaver.exe" snap
key:: Run "C:\path\to\WindowSaver.exe" restore

or

key:: Run "C:\path\to\AutoHotkey.exe" "C:\path\to\WindowSaver.ahk" snap
key:: Run "C:\path\to\AutoHotkey.exe" "C:\path\to\WindowSaver.ahk" restore

About

An AutoHotkey script that will save your window positions and then restore them to the saved position

Resources

License

Stars

Watchers

Forks

Packages

No packages published